|
|
我对syslink进行交叉编译到arm,但是出现如下错误:. l) y4 K$ ]1 _$ |3 T
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'$ w5 F* b' C" y" Q( j R! u
6 U Z/ L, o" A, Y e这个头文件内容如下: S; n) U. `+ d' g7 \1 |
#ifndef QTCONCURRENT_RUNBASE_H
+ a6 b5 }) N! p& ^( }: f' Y, ^( V#define QTCONCURRENT_RUNBASE_H) x0 O x3 a' Y
. ^4 x; V) X0 l* C3 i
#include <QtCore/qglobal.h>
9 v) J& U, p3 V/ ^5 b, _3 V9 X2 ^9 ^5 `1 y: S
#ifndef QT_NO_CONCURRENT, f k# Q9 ~" F9 |/ k" ?: b. _
8 } a( n. f3 o- y3 @) g#include <QtCore/qfuture.h>" l0 ]# |1 Q" d* Y
#include <QtCore/qrunnable.h>1 I+ ~/ O. o/ S' D3 ~ d% u1 A
#include <QtCore/qthreadpool.h>$ u9 v: t/ c0 U& W+ y
$ [0 Y" P: u7 W h- XQT_BEGIN_HEADER# i4 f: ^2 Q% E" C6 o1 L
QT_BEGIN_NAMESPACE t4 q% W( w5 P$ c) V6 h
1 D T3 O9 n) { u0 O; n
QT_MODULE(Core)! e* x0 y2 u! X4 r
: ~7 h* Y! ^( S+ K- X#ifndef qdoc) S" x% a6 K/ G+ [0 v
4 p$ z) k* u: j
namespace QtConcurrent {
4 ^5 K5 a& J0 P% c. r* O/ f' U) H3 ~0 k+ S, ]" T: C( K
template <typename T>
a) H- H* y8 o1 Fstruct SelectSpecialization. `3 g( ^+ }/ K8 U
{9 V C( G, u5 A7 h- ?& X
template <class Normal, class Void>7 q; y7 N! }9 |/ B6 U6 I
struct Type { typedef Normal type; }; e( f* R3 W# H# |# V& i4 z
};/ H6 n$ V4 T- C
: N- q5 [3 E8 J2 _( N! R8 dtemplate <>
+ s j; v7 x* \struct SelectSpecialization<void>
, G( L0 {5 c; z& w{+ i4 S7 ]& ~( {7 ~6 \3 @
template <class Normal, class Void>
( V% \' s5 @; P0 ^4 \, j struct Type { typedef Void type; };
' g) X! k8 J0 x' h8 n};
Q5 B: q( z% e: \, d( x f+ z0 D) m0 v
template <typename T>
* S) {' u. E3 H5 ?8 a+ _ n8 Yclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
6 ^8 h* z) J0 ~2 v. G; M{ t! l1 T8 G* q3 H
public:6 L+ q3 Q. A/ p/ A% o; X" E
QFuture<T> start()1 Y* {8 g; o' x3 p
{
) b( t- b# W$ |& e$ z8 L2 \ this->setRunnable(this);( D3 Y0 S, f0 W( _2 F+ \8 S
this->reportStarted();
2 D6 D$ h/ h G7 |. C% ~ QFuture<T> future = this->future();
2 l) ?( x) c" E% m& W" D7 l QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);0 n3 \. P. h7 r S
return future;3 p, }3 S7 s) D
}
* U1 g9 {! e6 Q: \4 h1 @
\9 S7 I# r q; G void run() {}
( P( {. ]- j& L7 R virtual void runFunctor() = 0;6 P1 J1 o$ R4 H$ j& E
};
( p: v J9 S8 ~* _1 d; u$ x/ a) \
template <typename T>6 Q3 M7 s$ E; A% t+ G
class RunFunctionTask : public RunFunctionTaskBase<T>
# Y! I2 Z e, W0 i{
) Z2 e: I; R) rpublic:3 v( I; B- X7 n1 b9 n2 Q
void run()5 x+ `3 D: J4 X6 I& u
{
J- T" ~1 x& k, e) e( Q: i if (this->isCanceled()) {7 W0 d2 l9 p. m/ s' Q* x9 h
this->reportFinished();
, P: [0 \5 u3 @) g return;7 f( ^: F+ K' K- Y. u
}' v) P% p4 h3 W& _/ N
this->runFunctor();8 o9 m0 k1 j( I( p. w7 j% H
this->reportResult(result);4 }6 X5 }; R( B" ~9 L
this->reportFinished();! O8 {3 ?$ l4 s4 \* ?7 g# j
}$ {- _. V+ j8 Y0 |
T result;7 W1 Z: \% q5 P4 H; s8 [0 d
};
7 }$ Y: X9 F6 K6 d
- m6 ^) Y4 o: d S( btemplate <>
% V0 ~2 y7 a, k# F Rclass RunFunctionTask<void> : public RunFunctionTaskBase<void>
& x6 E& O% Y& p+ ~9 L' E, g{; Z7 P: E8 e/ W
public:4 P' q" |( A4 Z/ U* ]3 x
void run()
5 ^9 I" N6 ]) I* Q9 X; o {8 z% S9 y) \. `+ ? T& l7 N
if (this->isCanceled()) {% u; B5 O" Q$ D1 O- P* ^
this->reportFinished();
P! L7 T# L+ G+ e( m. Q: M; s return;# m3 a5 s. y# O. c5 J5 `
}( ?" H' d+ n/ z- c+ F6 X7 l
this->runFunctor();
. d* e2 o7 {( r- s- H, a0 U4 y* V4 {" e this->reportFinished();
- P4 q2 |; o W' o } |4 O$ ]1 L' r2 N
};
) G: x, H' G; n: @, S7 ?' f! F! d* `0 `) k
} //namespace QtConcurrent/ K; t9 }. C! _0 f( L5 [
$ _$ {# i1 Z1 ^! B/ l) M; M r5 n
#endif //qdoc' h+ n2 _) b% ^% Y
, T, S9 d/ M0 I$ B, R/ W% u. `4 KQT_END_NAMESPACE2 s, n6 F+ S9 O G. J9 u6 f
QT_END_HEADER8 [7 Q- i3 ^# O; o
6 y+ e$ {7 T0 N; d- w0 c; l#endif // QT_NO_CONCURRENT
P( v8 K# P. ?8 C4 J
, N$ F+ _/ t) Y#endif
$ I2 R0 D# Q0 b8 y9 y$ S( z; H2 k# C& w o9 J' j# K
|
|