|
|
我对syslink进行交叉编译到arm,但是出现如下错误:7 t3 x$ M* Z, g! ~
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
, r, K$ ]# m: z6 ~3 o, [; m7 m y* a |$ O2 `2 Z. A$ q1 |
这个头文件内容如下:) M8 k f7 ]1 m' b
#ifndef QTCONCURRENT_RUNBASE_H( S) K# v: A" `
#define QTCONCURRENT_RUNBASE_H) U5 Y6 P: f1 Y9 [7 U) I& H* r
+ s9 M# e7 X; |! @ m4 h$ G3 e2 e6 P#include <QtCore/qglobal.h>
, U% p: P1 ]1 q5 Z, X9 u: C5 j+ m& G8 ?
#ifndef QT_NO_CONCURRENT' i0 k6 v) m1 x/ A
5 c# D) S) p' h3 j& n. b: W
#include <QtCore/qfuture.h>' x- F; r) b5 P- p9 A/ x
#include <QtCore/qrunnable.h># H- U# w5 r: ]0 h$ Y
#include <QtCore/qthreadpool.h>: Y. ]" i) E' C6 A
. H! A1 y+ q7 w: H, A$ J# p
QT_BEGIN_HEADER
% H( C" R" \) C; C8 _+ q3 _" |QT_BEGIN_NAMESPACE( Y1 `* ^0 u' p3 _7 M- ?
; v1 u( T7 u3 `' L9 X L
QT_MODULE(Core)
8 s( _2 j' Z+ W; J# y
9 R O- t H9 K#ifndef qdoc
. O8 I6 C# M0 E
% D) H& M/ Y l9 X5 L" Wnamespace QtConcurrent {
# I% v1 h: Y/ A7 Y: A
' c5 Y& l7 G, U+ Q4 v B/ w. Vtemplate <typename T>
0 U1 {1 z: w7 d1 G) _struct SelectSpecialization3 n: ~- x# X8 C- d( E2 K, n
{
! i4 j1 @! O' C9 ?% o template <class Normal, class Void>4 G1 s) d3 o3 d1 x4 K1 T( r
struct Type { typedef Normal type; };* f" D/ ^. A7 B, |6 q' o$ i! h
};$ D, `' F; G+ P6 J
. Z9 G3 @. H7 G+ `( T- m$ w
template <>$ A. E! V0 q8 g: |2 m$ Y. b) s
struct SelectSpecialization<void>
; C; k2 P5 b, H7 N; O{
' L: W' @2 p4 a r* Y2 I3 w template <class Normal, class Void>; | X9 y5 i4 ^- h
struct Type { typedef Void type; };
* W/ q) C7 O i, m1 y, v5 t/ X* l};
* |* X- w- ~# Q, W
U5 r1 l: [6 J, f s; U* Wtemplate <typename T>* n* `6 B3 J" O0 L3 O
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
J# v. U5 Q5 X0 b$ E{, k* Q4 a( L3 E/ W! e2 L/ T
public:% [9 K7 }+ _: i7 K- w' X4 P; G
QFuture<T> start(). ~! b, o0 x1 {( Z
{
! `+ i* M# F" y* } this->setRunnable(this);' M7 d% x+ K( q7 }+ o
this->reportStarted();- O# A' d2 C9 E6 x" n
QFuture<T> future = this->future();+ U0 v/ z! R% A2 D% @
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);( b* ]- @, w! |
return future;3 ?' O6 C. H' g. q) \
}! t* ~6 z7 W1 x9 Q/ h# D
4 @- g1 x4 x$ H7 X$ e2 H' ^ void run() {}
/ k6 N& `. ?+ {1 H' X" w3 \ virtual void runFunctor() = 0;
! j) U! K1 p0 w: `! Y6 j};
8 N- F' M- A) ?) v+ A5 ]9 |
* C/ H: J+ q! t6 x2 q. Ktemplate <typename T>
' P( E: H7 x+ a. [, t. b. }class RunFunctionTask : public RunFunctionTaskBase<T>
; I [3 w; l! x Z) a8 W{ p1 [5 k# I+ e. B2 m" f0 w- z
public:* Q- ^- t" Y$ V' B. b; `& c
void run()
( W5 C* M; k5 y u7 Y {+ {2 z8 H7 y9 L, [3 q
if (this->isCanceled()) {
' M; Z# e6 \4 l6 p: H" o* T2 u5 d# N this->reportFinished();
& v/ V1 y! \: U$ E( Y& R/ Q5 o* z return;
6 @! Z- b$ s2 b: ~( Z4 j- b }
6 h1 R1 | Q X8 y this->runFunctor();# G! U0 i" r8 }, } a
this->reportResult(result);! a8 k$ a* U7 r/ K2 e* T
this->reportFinished();
0 |: a3 P# H; u; r: w }
8 z& }( v P, n: x$ q& p e' y T result; z4 b3 ?2 O x. q
};' l3 e) @3 |& N! t5 [5 g. ~7 u' \
: Z1 |2 X9 b+ o8 E" ]2 x
template <>
( Y0 Q/ B+ S( Yclass RunFunctionTask<void> : public RunFunctionTaskBase<void>
n, Q: M( D0 p, J" N& X{
* j. n( V6 N0 ^$ H1 N/ P/ rpublic:
! p$ r' }8 ?; s) |, H2 \. W& v void run()7 _* w( k; H$ J; _. o; `6 d6 x& P7 C
{, C X- P4 P7 O+ }7 b
if (this->isCanceled()) {1 s/ \& ?9 n: k0 K' Y" Y' s& v
this->reportFinished();& M! m) O+ ]3 Q3 X X5 y
return;: B4 m! d! u" K1 M
}: F2 s. y- {" b
this->runFunctor();
6 M, m( c; f4 d/ P) e this->reportFinished();
% ^2 H. H3 D3 k! P/ u# ^# D }6 G9 D k6 j% U+ r. Q
};& o9 h. w4 @8 u3 o$ I
! D* i ^9 y) i! F! ^: |1 u
} //namespace QtConcurrent: C' F! |& U- L6 g
# i2 j! ]2 h( @; W1 ?3 F#endif //qdoc+ s8 n) J+ M" c
; u+ i' d; x% {) Y6 Q# NQT_END_NAMESPACE
9 G7 N8 U* {5 j( x$ X' f: f6 dQT_END_HEADER* `$ N" {% }4 O& t* h
# A/ H# Y' m" X1 [8 a4 \( D#endif // QT_NO_CONCURRENT3 f8 S1 [+ a/ ~6 `8 j$ W
2 W5 T; s8 `: @#endif6 O J, ?: `$ I# a- n
( _% w+ b6 \% N R2 y3 y! A( [ |
|