|
|
我对syslink进行交叉编译到arm,但是出现如下错误:* b8 x9 ]+ `5 n6 ?
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
: _& Z+ @% V* H! U8 e% Z) U
/ f9 y9 {% e; E. m2 @. ^这个头文件内容如下: M- e c& L9 q6 i0 d' N
#ifndef QTCONCURRENT_RUNBASE_H
1 [7 h ^, ^. i! r( o2 c#define QTCONCURRENT_RUNBASE_H
" F* M8 }3 s+ x! ^; c* N( H
1 [$ W& D7 d+ _! E3 D" Y( u#include <QtCore/qglobal.h>6 q: E. e. J% S8 E. q- ?
Y+ E& r" X9 i) F R#ifndef QT_NO_CONCURRENT" [' N( `, e7 Q- \8 S, ^
( V/ R4 j" A! {7 K! I2 P0 } e
#include <QtCore/qfuture.h>; T! S, F( W/ F2 z3 o8 y/ u5 b
#include <QtCore/qrunnable.h>) h% U0 ^4 a9 E0 d
#include <QtCore/qthreadpool.h>* b% d, ]$ m- Q
8 u) R2 J" L8 s# W, N5 }8 d# F
QT_BEGIN_HEADER$ Y; `% o0 b- j* S; E$ @
QT_BEGIN_NAMESPACE" K: B6 L7 J( ]+ ? d* T' R
& Q9 T) Y% F7 _2 }; s( y; W @QT_MODULE(Core)8 r7 H. p; |& x" y. l: K
* `$ c% b5 C* B/ O' n* A: }8 q#ifndef qdoc$ L! [1 K/ S' q5 g: M
8 K2 \" k! G1 u0 {/ s) V Enamespace QtConcurrent {
& j8 g6 V' F' g$ s7 _+ m3 h+ k* l
) X' k, E" [( v# y9 Ytemplate <typename T>
! E; f( ]8 ?3 q* C4 k6 dstruct SelectSpecialization
# n! G/ ]' i7 L9 V" _{
( O& k: Z6 T) c6 ^; T* ^ template <class Normal, class Void>; E) m# L3 k x5 Q5 _6 i
struct Type { typedef Normal type; };
4 e% q' D- a; T3 O* d$ ~};
3 f2 N! k+ m( G" j& |7 P- Z3 j: e4 i0 k
: F; ^8 B# \" A; j$ @template <>
8 w# S5 e* W* k* p) j9 ]! Bstruct SelectSpecialization<void># K) Q2 Q! Y, h7 F" l
{8 ^7 n' f: i! T1 r6 @1 T3 f
template <class Normal, class Void>+ Q5 O/ o3 e$ [/ b$ e0 d' Y$ b: X
struct Type { typedef Void type; };
1 ^/ S. [" |7 B5 ~# v$ r};/ l. s! l+ E% Y# S) l" g' R
6 ]7 ?; t6 \7 I3 u
template <typename T>& i+ u7 n, f/ l% E7 c8 ~0 R% w; ?
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable. W" K. D; `3 [
{/ b) y, n1 }2 u1 d! u# z; |6 t
public:
- o/ C; h% f# s QFuture<T> start()! l0 ]1 q: j; d0 _5 J. |1 e- P2 F* X" o
{: L. W* ]/ C% x6 K4 D. n, v9 S
this->setRunnable(this);
8 |6 `. v) O; I) H8 B) [7 \* k this->reportStarted();
6 B" X& ~, q: I5 Y QFuture<T> future = this->future();# [# t8 \6 G& T7 _7 Z8 m
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);+ N2 d6 i1 _, s, J7 ]) [# @1 h
return future;
0 y9 S6 D( G* r0 a) a" J }
3 K/ z% }, c/ }5 R/ Q0 S/ s/ q: e- ?- |+ Z9 \- _" h7 j% u+ ^
void run() {}
# z- v6 a; C5 M1 [$ X virtual void runFunctor() = 0;% c( h ?+ ]; Y! |+ ?5 X' C& y
};! Y& ?2 {& K% M9 g
: N' Z: f; g O# i0 m# s& F* Q) Q
template <typename T>
$ n2 M/ h$ n% Y( n+ L: R" t0 J* Cclass RunFunctionTask : public RunFunctionTaskBase<T>
C4 o A4 z0 s{. \% C( y; {6 `
public:5 A# G- z, q* O
void run()3 w' l' |7 F$ E1 S9 k
{
$ s0 l) S3 q `, E if (this->isCanceled()) {
6 k* m- S% Y5 F) u, a+ H this->reportFinished();( g _ l, A) J6 s3 C
return;
8 \6 R7 Z5 w/ D$ b, ?# S }
( p* ?! { H8 T1 }* ]1 M this->runFunctor();
2 c1 c. v: p8 d this->reportResult(result);9 Q4 L# K& E) Q) b# l
this->reportFinished();/ z( H0 [( f% f( y
}
) p/ H6 m5 p; u$ n0 E- [4 d y: l T result;
1 [& A# Y0 q F h5 j/ s! y& L1 j};
; @8 z. {) I; y9 a& [4 ]* `6 ^. q' @4 X# q: f* |: B* | z8 i8 l" |
template <>3 q: J/ f; L% d* P5 W
class RunFunctionTask<void> : public RunFunctionTaskBase<void>- f& ?% w/ T& j8 `& K
{ W# q6 N8 c3 z9 U* @
public:' f6 d+ Z8 @/ H- Q
void run()9 Q# d" c! ?; x+ z
{
' E5 }+ \, |) i1 C) u if (this->isCanceled()) {! |6 F' a) F/ d! M/ t3 s6 Y
this->reportFinished();
% Q% }" {" n6 G8 M; {0 g return;
8 K3 U- D) R- l }
. b0 ]( ]$ s! z7 ]+ F% A this->runFunctor(); U7 m0 _6 v' K* s# ^; x3 C
this->reportFinished();" N# ~9 I+ ^2 ^. @, R
}
/ t) N; q7 O1 M8 t};; a/ S( a# ^, ]( x6 x( d6 h( c- W7 [7 }
7 ]5 K8 D+ {- Y% {0 L} //namespace QtConcurrent
) d: Q/ y( f& _# `0 c; W3 z. w6 s4 E: ~" c+ B3 Y* d8 N
#endif //qdoc
* o) | u8 m% |. s/ p) e" Z" N9 S
QT_END_NAMESPACE
2 l2 ]0 e% g4 s2 V- SQT_END_HEADER X9 A9 z. @' ?* I
) P; ]% {3 g8 p& U, ^# h: j& L
#endif // QT_NO_CONCURRENT& p/ ~; _2 Y: ]9 K7 T$ `* C' A- y! ]
5 w( ~3 Y7 p; H3 t$ _! h
#endif* N! B7 v' B! G" g& u. T0 R
- i/ B' n6 X. X: h9 g6 J
|
|