|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
" v& u& O& l7 J' k9 O0 d/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
4 b# D! R& b5 d: i* G& i
: q2 ?0 u" _% G8 {/ ~0 [这个头文件内容如下:
. R* t# E8 ~1 @#ifndef QTCONCURRENT_RUNBASE_H
8 l4 h" B* l D+ v5 V Q; C( m#define QTCONCURRENT_RUNBASE_H- T( R5 c+ v' u
" z1 a% m6 e* q( G$ u6 o9 y' g#include <QtCore/qglobal.h>1 Y( f6 ^' ^# B! K6 S$ T9 D' ?
2 W( h7 n+ P9 t#ifndef QT_NO_CONCURRENT# G4 N: `( n |; \% D: p
) t; h/ r7 s4 b Z; ~; A#include <QtCore/qfuture.h>
7 T3 n: H1 D6 O ?#include <QtCore/qrunnable.h>/ f( K2 O5 N! }
#include <QtCore/qthreadpool.h>
]" e# v5 \1 i4 A
: p# h8 I+ e* t6 o( X8 `QT_BEGIN_HEADER
9 |, d) f& d7 d( ?" D/ t rQT_BEGIN_NAMESPACE* d# f9 O6 c) Y3 M0 ?4 z
! V8 \: W! L; t9 C
QT_MODULE(Core)) J6 A. |3 [8 D' v2 _ w2 E
P( Y' D. Y! `7 N#ifndef qdoc ?% d, p& n+ [% O* J
% a* z) F) l/ v# ~% o* cnamespace QtConcurrent {
1 K; d: F+ O, D+ z4 n
0 t" [# v" r. r( S! M! Q& Qtemplate <typename T>
$ G3 \+ L( [1 I6 \1 `9 ustruct SelectSpecialization# L* ]: _( Q& S: k1 O
{
3 G6 O# f* Q3 y8 N! Y9 e1 K template <class Normal, class Void>
1 f! A0 Q8 ^* @( _! I* `: r struct Type { typedef Normal type; };+ R/ E0 q5 j, w( [9 \1 X
};
: ^' j" _% A: I6 d+ n
8 k' |4 H6 T, Xtemplate <>
/ S6 s; _/ H, y% N8 d2 a) mstruct SelectSpecialization<void>. _ l8 n( Z; s1 [, o! V9 F
{/ v1 Z6 C# b+ P) k
template <class Normal, class Void>
O* d- l, M: _' Q u4 x struct Type { typedef Void type; };1 e# c8 x; m& W( t
};
# X" l9 \* E3 S
* k4 I" o8 N3 f# V3 utemplate <typename T>
. c9 J% R" @. b( F! e7 v5 ]class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
8 s- I) X7 g5 w2 ^- W{
& S- X" R1 }6 A1 ?4 X5 c9 Xpublic:) U# f: c5 W2 \* h$ q+ O; x
QFuture<T> start()7 Q/ S/ S; o2 W1 H2 C0 \% f' a
{
! h- t4 b, @" ?" N" Q this->setRunnable(this);
* h! Z6 |. D# h' | this->reportStarted();
7 B( G, s" u4 x QFuture<T> future = this->future();* n4 D/ ^& }! l) O% V
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);7 O2 H! r3 @1 I7 Q' U$ X
return future;3 U# o1 {1 `8 J C
} ?3 A9 m. {! P6 ^* N
& B9 R1 U6 A: k
void run() {}
% n5 f/ p: B, i& s# ] virtual void runFunctor() = 0;
9 K% q. |$ q8 w# Q5 t/ i6 p};
$ _3 h$ Y: f1 h2 k& `
, | R- T$ F& V; Q! ~template <typename T>* F1 p2 @! ^+ O7 }& d
class RunFunctionTask : public RunFunctionTaskBase<T>/ { V) F- t" `( ~ ]3 t; |% E
{
; m% b6 v% J" C5 S( ipublic:
- }4 n" J$ ~; r+ S% s) J( s void run()* w) b8 \; j3 r0 ^
{
8 E# l; E) K' C if (this->isCanceled()) {# B6 ^& n6 Y+ N+ x- c D( x4 W
this->reportFinished();
7 z$ y. `3 ?! y$ b" Q& _/ ? return;
2 }5 e6 B5 o' U( C; G& @% ?6 ^& u }
: q) D7 `& A+ [/ X& r- C1 h4 V this->runFunctor();
! \/ T9 @; N/ l+ I" g% K this->reportResult(result);0 c4 }) N0 ^; ], e4 a
this->reportFinished();5 u+ h2 L. o2 v# K
} l& ~: h" J# F2 A3 M8 }
T result;
" W, {" V* B3 D- y( b};8 Z6 C* e" x5 d& } u
# _/ D' y( K! z9 U& n6 {. Y2 p
template <>
) M/ C& w3 O7 Lclass RunFunctionTask<void> : public RunFunctionTaskBase<void>
: u4 n, `, D% a7 \' @$ Q" Q{
4 U S5 t$ a) y1 Y$ R8 n5 y0 Opublic:7 L) o; G4 h7 _$ c* s- W
void run()" A% |1 L/ [/ T
{
- I. P1 H! r! c% }# a% o8 U* h if (this->isCanceled()) {! a2 \; x5 S& f
this->reportFinished();
8 n% H& X# t- C0 O return;. N8 @# z* L' R. K2 L0 @
}/ j- ^/ m4 y3 N* d0 G
this->runFunctor();
1 q e% o- n( k this->reportFinished();
& r `* t P Z9 ~4 Y, i' ]! Y }
, X2 P8 J r" c- G/ Q$ y; l0 W};
4 v( k+ b. g7 a4 O- E: u- k6 `( P8 A* w
} //namespace QtConcurrent
+ E1 R6 n6 x5 ~# K! z! G% ?) o3 m/ A- ?+ ?# h# ^
#endif //qdoc# w' M9 Z" F. s
( J, J$ M' w) J' V2 f$ T JQT_END_NAMESPACE5 L1 X9 w9 u6 C5 a, R4 m
QT_END_HEADER
! l0 h; K$ F4 Y1 C' W( j' A( y; `: s/ L. |7 g$ T
#endif // QT_NO_CONCURRENT
# T3 K+ Q0 c; v( J) V. o% n, H
' s/ G* |7 ?* Z#endif
7 ^* p+ T. B) K" v. e8 r" @) o7 ?) H' N- |/ u0 ~
|
|