|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
* o/ j) P! J" m" |/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
3 j2 \2 T0 L# c& U$ A$ I( A, S ^. V, \' A
这个头文件内容如下:2 b% D4 {/ C1 Q/ f8 M6 m7 W9 C
#ifndef QTCONCURRENT_RUNBASE_H5 `5 K- j @- _; h, G- u4 W
#define QTCONCURRENT_RUNBASE_H
" V& G& v& ?/ _! _$ _
, u& |; n! _. U0 @' ~; c$ J3 g#include <QtCore/qglobal.h>
- }7 [! F2 P8 G! m
. u K( p7 _6 E7 c& Y( A3 b; d; @#ifndef QT_NO_CONCURRENT- H" z$ K3 I2 h: @
1 Q% ~, ]/ j$ D. v0 t* g
#include <QtCore/qfuture.h>2 @: r; ~6 q5 b8 K
#include <QtCore/qrunnable.h>
; Z- D' s8 ? V+ V#include <QtCore/qthreadpool.h>
8 b* E9 T& J, ~5 ?/ a* D
4 [, m% K) n8 r; x* J; OQT_BEGIN_HEADER
" ~/ H% n3 a9 u; [QT_BEGIN_NAMESPACE" @. p) E( h9 v8 Z" R
8 f; a1 i* T8 M8 M
QT_MODULE(Core)
) v7 V6 f6 @! T; ]
W7 o- f! f. l8 M0 a. C# ]#ifndef qdoc
( ]; X% H0 x, B0 V3 }9 p
9 d3 k5 f0 X, _" ^8 A$ Knamespace QtConcurrent {& q' b& v; g9 c; E2 l. l
. b, Y2 D7 R; m
template <typename T>0 E6 e' O# V8 e4 {9 @; Z; d4 b
struct SelectSpecialization
( e F, S. B# g& e7 |{
& {" L- `( F" h" l template <class Normal, class Void>
0 M3 E, _* [ Z | struct Type { typedef Normal type; };" M* `( c3 J! g: G, V
};
. _2 A/ {" j Q$ i- O
+ O% ~. n4 J. r6 p$ Atemplate <>
* b: C. n$ u& O9 |( o8 z: [ Astruct SelectSpecialization<void>9 ~3 p6 w+ M- c" i. h7 S
{9 R- d) t3 u2 d5 d6 \/ R
template <class Normal, class Void>! j/ \# m G' U6 U% O& Y
struct Type { typedef Void type; };, B( P" W9 m# g" W" L5 a
};
" F9 l4 |7 O/ U9 X! }0 k/ v3 V: I h4 G
template <typename T>) ~# l3 t& j, s5 Q7 q/ b) h
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable- S! Q$ Y% i( p
{
, u$ ^% m4 j% I& f5 M4 t3 s* `public:; k& Y. {1 D1 [. A7 M
QFuture<T> start()$ g1 X( J$ O% O; _8 X6 r
{' r9 [* G" _; Y' c Z
this->setRunnable(this);5 [1 p" x9 Z5 {6 X4 ]
this->reportStarted();
$ T: n% x. Z: S6 Q7 e7 G QFuture<T> future = this->future();
5 t6 r ^ t6 x3 Y( b& t& J- N" s e QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
9 N" x Y; ~3 ~3 F. f8 [6 | return future;( E. j- q6 o2 }9 K9 t) q! S$ k( p" C
}
0 t/ d' q) R8 n0 c7 j# B
( I6 m0 q5 }6 l/ I$ i void run() {}
5 [. z4 C" l0 M2 i; S$ C" O virtual void runFunctor() = 0;
6 f, ?+ T9 ^+ [( b0 r};3 l6 k, u& I( D$ a8 n3 ? X
0 H; h0 f5 M5 w) I
template <typename T>+ C- n( \+ R/ a& A2 m
class RunFunctionTask : public RunFunctionTaskBase<T>) ~% z8 \& G% v+ o* Q+ s
{' f+ a: h8 V; y4 Y2 i' ^
public: s* h% Z5 S# `
void run()
: [, o( _) t1 C {) r1 X# T2 q2 j- o. v9 T- K
if (this->isCanceled()) {
" J Z8 @: m, t- @, Q this->reportFinished();9 [) a- i4 e& {
return;7 f1 r" z5 a* X, \) h: ^6 [, H5 ?
}
3 y% O, }8 s0 c. p this->runFunctor();
# P# v# u8 K! H' \3 s this->reportResult(result);
, m( Y& G1 I3 g4 ^ this->reportFinished();
8 G4 O. y6 {0 Y$ ^ }
' H5 X* z3 `) h T result;, z" p2 p! \3 {% B3 p" I! w7 K
};
# B9 x6 o/ r' _' p- i7 f- u
5 N5 e, C- r" a Ttemplate <>) y; m, ?5 \% y U3 ?; M8 A
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
6 L' j% ?/ G8 O2 I( w- {6 l{
0 x5 @2 g& t7 B% upublic:
2 [& U' l) V" p" c. b void run()
) }( C0 N [; D7 t( s {
& s) d9 Z& q( W$ d- X% e if (this->isCanceled()) {2 q$ T0 e: x( q
this->reportFinished();
$ `' x1 D z: Z" h& ]& k return;$ E& _+ {1 z3 c5 _( [9 a
}3 W7 R; O# _; E* K7 N8 H8 b7 N7 j# G
this->runFunctor();
5 R" n8 }4 T+ z1 p2 d# u" B$ E this->reportFinished();
1 u$ |* n% r. j" X( v }3 \; l% _6 m0 ?: @# g) j
};3 ?4 J/ y7 c" ]7 o$ p: }" y+ m# d- L
o. {' @/ e; f! y' ~7 t} //namespace QtConcurrent/ _' M3 D ?- J( Z# F
- z8 r1 C) @& B/ P; U6 W/ h
#endif //qdoc
" Y9 t5 y# z3 |5 b2 U- A* m& w' \2 W' s# s
QT_END_NAMESPACE/ [5 V$ _& P* S# o
QT_END_HEADER
' P% w4 J2 c( q w' B! h, R7 m) Q
#endif // QT_NO_CONCURRENT
# s* s9 V# X6 ~; B3 w; \) v( Q% P- ~
#endif
1 r: [# \5 g0 @' \( n7 S8 D- F F! Y/ p+ i5 S7 o: m, U2 ]* D
|
|