|
|
我对syslink进行交叉编译到arm,但是出现如下错误:0 f8 z! q* G2 u' w
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
/ e5 l5 a* L! f9 ^- l7 s4 G
* r3 ?$ d) Q4 s. p i0 N这个头文件内容如下:0 {8 `1 k5 X% `; H* T
#ifndef QTCONCURRENT_RUNBASE_H
/ }' B2 J/ q$ M* g#define QTCONCURRENT_RUNBASE_H1 q. I% ~8 b: H" R4 E8 c$ s
! ^9 z6 r& q# m& ]
#include <QtCore/qglobal.h>
' p% B8 k+ U8 y/ p- s
9 T2 ?8 u; H7 g& M#ifndef QT_NO_CONCURRENT. Y$ ^- D2 w0 K# G5 R0 W" t, o: O4 N
3 G% _& H) n9 S; c, Q" y, G( H
#include <QtCore/qfuture.h>. L3 \8 w2 g7 x
#include <QtCore/qrunnable.h>
( c+ ^% d7 o7 n0 l9 A F% L# E' X#include <QtCore/qthreadpool.h>
6 k+ g- U% B8 Y5 S% x
# [3 K! q# j/ a8 NQT_BEGIN_HEADER
) D* h* \5 s% N9 R" OQT_BEGIN_NAMESPACE2 z$ k0 [; O; T/ C! M( s2 g
2 c- Y2 Q$ f# {
QT_MODULE(Core)4 O; @; G* n/ a7 b' B
) d5 ~) e% `* ^) m. X3 s6 d' k#ifndef qdoc
' Q4 i0 Z3 h4 e* u
( A% f4 Q8 U3 L0 |! N4 A" Pnamespace QtConcurrent {; {* ^* B6 ]' V7 R/ p5 U. U) a7 T
) c1 V; W4 _, d0 x! {template <typename T>
; X( J: k$ g, ?: F& W! Mstruct SelectSpecialization9 r0 p$ _5 v& ~7 V
{; l; j2 V% T6 Z
template <class Normal, class Void>
6 V& M+ I: [' J, a' x4 ?. Y struct Type { typedef Normal type; };
+ ~- k7 q7 O: r0 J" [0 Q1 A) Z, `};7 J7 }+ ^. M- r$ T I. \
) E7 V+ S3 e7 L6 a5 l) _template <>; C8 i- U9 P+ L" Y9 q
struct SelectSpecialization<void>
: a3 ]6 n+ o3 ]{
, @" Y, S- W# ]7 ?* O/ z R7 p template <class Normal, class Void># ^ u$ J( F% l: h6 ^2 U7 K0 a6 R
struct Type { typedef Void type; };! q' V( n3 u e. {8 r2 I
};
0 C& U: w0 }+ S7 i, A, U) X5 V; V
9 U- N5 C: Y9 F7 ]- j etemplate <typename T>. p" N' i/ ]/ z! |
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable$ h: a/ h( m; a7 V0 ?
{
A/ S* a% Y x1 q( R' C8 ypublic:
a: K8 M* S% v* S4 n QFuture<T> start()
2 {6 z$ {& \, l& Y/ @- Y5 n" `3 ] {6 n% \6 Y7 K0 ~8 D2 d
this->setRunnable(this);
. M( @& y- A/ U6 I0 ^7 B& _ this->reportStarted();' V' g1 B I1 y$ {! j4 {0 e. S
QFuture<T> future = this->future();
" M4 u O8 [8 B8 t" g; S' V" P QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);* f t9 U+ G& \
return future;
1 o! [% }3 i( {" x% i" \' N8 P }- a: [( U. m% q* }7 K
$ {1 h' h4 g" f/ B7 n% W void run() {}$ A- u7 Q. h- i6 t
virtual void runFunctor() = 0;
0 t- p" K7 e( G6 U( Z7 P};
2 E `9 k$ t+ a- N+ Z5 p1 g, ]0 B$ N8 ^2 `
template <typename T>
3 f( u7 m- I! l: D6 t: H* `6 Gclass RunFunctionTask : public RunFunctionTaskBase<T>
. T3 U8 o- s9 f: E9 X{
; E# w: S4 g/ W# E& |+ Npublic:. Y* H" o5 x( [; j& B: I# k
void run()
9 q1 Q4 Z" \: ^; ~. D1 C {
. \& V+ V1 U- ]- p) v+ K if (this->isCanceled()) {7 c H) `; h5 @' q/ _ N7 }% P
this->reportFinished();2 @6 q1 z2 ^- u% R& _
return;* {4 H- T$ q. X' ]6 m: f" B
}
! w' v5 c+ u$ l" X ^ this->runFunctor();- ?, e9 M) E3 c
this->reportResult(result);
! d& v5 U+ {8 \* J8 @2 b0 Y9 N9 x: W; Q) O! m this->reportFinished();; {( T3 `1 B0 W; T6 L. A( ?
}2 o/ I4 T% x# M5 o+ x
T result;
( Q9 f+ }9 _0 Y/ H( c* B7 y' g};
& m% s$ _# L2 `8 d* [! m+ v ^6 J# V0 i3 Z! S6 A+ r3 ?
template <>- z% \3 F( o' ]
class RunFunctionTask<void> : public RunFunctionTaskBase<void>2 n; V; K# V7 r' w
{+ o4 G! _& T5 H6 C: z2 A
public:
/ Z9 O$ H4 J; i, m5 q# c& d void run() y6 V$ R1 C. Q& V9 P
{
1 H, u4 c5 T% P* G* m$ V if (this->isCanceled()) {
6 B: y! {$ D; E this->reportFinished();
4 G( w! R) t* k. N! x% W0 a) _- X return;) a/ y( J) @% ^6 W( b& C* L
}
$ h( n i) W7 L0 ]* B7 i. ?! U this->runFunctor();
1 s) w) U4 P& t* s& F7 Q8 u this->reportFinished();+ X& |( f9 o5 k4 Q+ n& p+ x+ p/ f: ^
}0 ]( F; ^* e7 I' ^1 q0 V! N
};
$ `# p% p2 C+ R/ t4 H( h- A5 q2 s' E% U, A
} //namespace QtConcurrent
/ Y. A! _$ Q _7 g( k/ i2 Y& f/ e4 ~/ @! |2 t( T4 O
#endif //qdoc2 i8 g) e" j$ K* _7 `2 v
5 @0 d* E. l/ A( N4 p, _8 l* \6 d
QT_END_NAMESPACE# Y" X) B# u7 Q1 m7 R% [' B, u
QT_END_HEADER7 J/ Z1 e9 ^) d8 [$ m) z
! T. p1 C z) v8 R2 X#endif // QT_NO_CONCURRENT0 x) ~8 S: q( X- w
5 r6 k( V. K; h& [4 X
#endif# B! h) d: `' t5 ^6 N% w! [ U! A c) M
8 D" |* U$ {+ _4 V
|
|