|
|
我对syslink进行交叉编译到arm,但是出现如下错误:/ z+ J X$ ]1 }" e' X
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
8 a. R( U8 w* _& J- z8 m; X4 r, ]) Y( |- n. \
这个头文件内容如下:/ D* |/ i- F% ?4 O3 s; v- W& b
#ifndef QTCONCURRENT_RUNBASE_H
* i$ A2 l8 c* P& e9 E3 T. w% \#define QTCONCURRENT_RUNBASE_H7 T' ^; M9 @3 X! q# ?& l- G5 ]
( q k; S! q; T/ O( g: C/ c0 H, N2 O
#include <QtCore/qglobal.h>! g' W9 g u. d |3 z
4 c- J% o* b0 s
#ifndef QT_NO_CONCURRENT
& b- G* i/ d( \
( Y0 v! L3 ^* L' P6 p/ k' w#include <QtCore/qfuture.h># H! b! V9 ^0 L L- T5 \8 i& e
#include <QtCore/qrunnable.h>
$ }. k1 m2 O! x5 K- C+ t# x#include <QtCore/qthreadpool.h>0 Y0 c C8 ~4 R0 m- { F" T5 v
4 W2 O( J5 @1 @# c: q& G
QT_BEGIN_HEADER
4 P/ H* `* ]4 G r( sQT_BEGIN_NAMESPACE
; p7 e* @" }5 Y# i2 x( V; Q+ O" A7 K$ }4 B- O
QT_MODULE(Core)
9 D. X* p1 D. t
, R& h, U8 w3 f6 Z0 c+ M0 J7 z9 u#ifndef qdoc$ p& ]5 ~, a) L) _/ _
3 J$ J$ [( `/ d- a4 J/ a1 M5 f: I9 O
namespace QtConcurrent {+ P2 d- u, b8 o) s
: ]; G# o, g ftemplate <typename T>
3 R+ L8 q, m, Mstruct SelectSpecialization
2 M9 q( h$ B# w3 V$ L) ]0 o0 G{2 _8 V" f2 e- `. A- o
template <class Normal, class Void>: B* Z2 A e q* A, |
struct Type { typedef Normal type; };
& s, h' ]9 m8 d0 J& ^% R- \};+ b& n7 r- a! U. t+ T* a' i1 v3 w. K5 _' H
* `' m' `! Z7 a+ y1 f7 l! ?template <>
. Z! b5 N- ]/ P* ustruct SelectSpecialization<void>8 ^2 @5 |9 Y# P8 W. X3 r; P* m
{. {' m, \! s" Y8 l5 ~( {
template <class Normal, class Void>
; @: O& M' {- \9 _ struct Type { typedef Void type; };
! ~5 h8 O+ k; a$ G' f0 j4 T& [};8 y( Y& i( A2 Q8 ?8 p
! R/ \/ h7 H& I, ?template <typename T>: X, {2 W8 |! u2 {6 d2 b" N
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable9 }/ D3 j: \: J7 G/ K- l' y6 R
{
$ O. n% u3 s" `4 S) Z) Mpublic:
# r! s/ U5 x2 w1 g: ^ QFuture<T> start()
# r3 e* B) Z/ l5 u" Q {
6 W$ ^3 q" I/ i, W8 ?, ~ this->setRunnable(this);
4 n$ T: a7 {( [. v* t$ q this->reportStarted();
8 _* X3 Z" H1 ~ { QFuture<T> future = this->future();) e5 @$ O' T5 }4 v* o( e
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
) r& @* _* V4 z% i- G C return future; l8 B% n2 H- X* D; P
}3 R( L0 H: E4 V9 @: Z; J, ?
* E/ M. I3 K1 d void run() {}
& B5 }5 y9 @* n* G virtual void runFunctor() = 0;
/ t" b. M6 \* [( q/ ?};
U4 s9 v& f7 c; {) E0 a. C. G' b
/ j# c# X# B* Ktemplate <typename T>
% n4 {8 P4 p7 q x: d" t; Zclass RunFunctionTask : public RunFunctionTaskBase<T>0 {, E6 |. f" u. t0 P v
{
3 S& @! _9 }! J( l, Vpublic:+ \6 e U2 u8 F1 f, I& T6 c: @- Y
void run()6 u, C) m: J. g' W; O3 b
{# i4 O7 c" a& J" Z
if (this->isCanceled()) {
: Z$ T- {( ~- M3 C$ @ this->reportFinished();
+ A( y7 f6 M J8 i return;. |) Q. v% T- P8 B' m0 D
}: h/ R7 ^5 t0 T9 C/ L4 E6 u' V" G
this->runFunctor();" |& b2 x/ G% d" W& t" _0 f7 ?
this->reportResult(result);9 d0 E" L$ l3 Z' c5 r
this->reportFinished();( z* \$ C1 h% q5 |, E9 K- J P
}
& |/ {& X& ~$ S0 u# E1 _# c T result;8 m6 D2 \8 D6 a5 j7 A& b
};5 }+ m3 E& B% x1 N
( Z- V$ U; P7 U7 {template <>$ N( r( p3 f1 H- X
class RunFunctionTask<void> : public RunFunctionTaskBase<void>$ S3 n+ ^+ s4 Z' y
{
& }* D6 R4 \$ N. l8 }public:
2 h: |( @$ e) x, f i, \- Y7 V( Z void run()
+ n+ t/ x4 L# G {
# v2 h+ a3 B0 S9 Y1 E/ t if (this->isCanceled()) {' t# P) T- A U- d1 a) a+ H
this->reportFinished();
- V" v: Y5 V/ k, h7 S- d- b return;
4 T0 s; @7 S' W* ?; ]# X }
8 w! r9 g4 O; b* p4 Y/ @0 ~; \ this->runFunctor();
9 L$ C1 t0 B* V this->reportFinished();1 G3 s, V6 i5 e$ u
}, a$ {; |; W& i0 X3 c% S; p
};
7 o" s0 v. J' _$ R, U0 y6 F" ?3 P
} //namespace QtConcurrent
$ C: F2 ^' R' I: }, s& g- a$ j2 ~3 R/ }4 [5 a7 ]+ m/ }
#endif //qdoc
. y1 O) d& J: n9 j& J+ c+ h8 T2 C/ Q# `* a+ Q$ ~9 d6 b8 H
QT_END_NAMESPACE
: N% u( E/ g2 L1 J5 w8 W: q* M3 oQT_END_HEADER8 K0 x: C2 Y/ h0 L* l
2 V8 u, I" a/ n- v: Z
#endif // QT_NO_CONCURRENT% X1 v1 q" M% V% ]$ q# y
* L9 W) F" x0 u% A9 I#endif6 f8 o7 J: O0 D, C" ^
7 y( z& B. G5 h1 F7 T! p1 M9 J. D
|
|