|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
- c @6 H: p' o: L% z/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
1 {. ` j3 F9 K& c' H/ k1 [0 o4 d. O8 }6 c3 T$ X; \: f
这个头文件内容如下:
5 ` i" G* t7 B#ifndef QTCONCURRENT_RUNBASE_H9 Y: x; p! S8 M0 ?/ n) b! K6 c4 I
#define QTCONCURRENT_RUNBASE_H
" P5 a, ]2 ^0 D1 K
w/ P% D( d. J3 E/ b/ L* O#include <QtCore/qglobal.h>6 ?5 l' M. Q3 a9 n- l2 a
9 s `6 h% H$ M; o3 j9 _#ifndef QT_NO_CONCURRENT
1 J4 Q7 I w. V9 i5 r1 P
# e/ T5 F4 x% X& m#include <QtCore/qfuture.h>
! D( S3 J/ M, ^7 s U2 y#include <QtCore/qrunnable.h>8 O( s$ O) c. h" `- H0 ]9 N
#include <QtCore/qthreadpool.h>
6 J! p3 U* {; d, P7 b, Y6 u' E( [: x# b1 X
QT_BEGIN_HEADER* ^+ H1 o# R$ E. V
QT_BEGIN_NAMESPACE
* X2 d3 [ `% F7 r2 y. N3 F2 |" N* Z
9 I; m4 U2 l. B+ ?+ k c' mQT_MODULE(Core)+ q( ^9 p0 O8 d K2 ?
, P- k n& O1 B6 U1 h* B- C#ifndef qdoc5 b" K, @% D) N( O- F
) j8 f" B3 m3 s, ]7 I2 U- e8 T0 lnamespace QtConcurrent {
# X' o: x' y4 c4 k8 q' Z7 S7 V" E
2 O6 l( A$ L5 @# E) ptemplate <typename T>
X0 z# L5 g6 K; ?3 vstruct SelectSpecialization' w, o9 {; V, A6 G6 V5 D3 j* ?1 p
{- S: F& G. o- w: \/ k1 [6 s
template <class Normal, class Void>2 n( @+ f2 u! Q# i$ s9 A
struct Type { typedef Normal type; };9 K1 f% H Q+ P0 p
};
: M0 P& d! T) j0 U& a c
6 A- u% Z& c; \! p% L' e' W! dtemplate <>
0 ]6 R, K: S5 @- |& o0 {- Nstruct SelectSpecialization<void>
( P8 s0 k$ T( }2 [+ p: @+ n3 D{: n6 J l) s j$ m" l4 y
template <class Normal, class Void>+ g( t% x) z% }
struct Type { typedef Void type; };
4 ^( w. K, Z. J8 i: d1 O1 y, ^% c};
4 g8 G: i [% B2 X) O
{" O: \, D ]( @$ [. n4 [3 Ktemplate <typename T>0 u* |* j2 Z8 Q* q
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
4 d% ~/ v; K1 U# W) E: Y{+ H7 B8 E( r- K
public:
: Y% x- H# l. i# i5 k4 v5 k$ ?, R QFuture<T> start()5 [) O2 z' W2 g$ ^% E4 ~+ m
{
" F E- o& u6 F# ?1 \9 s) n this->setRunnable(this);$ \( G. e6 Z; _0 |% Z- l" a2 S
this->reportStarted();
, A) [6 B& n4 p5 Q& } QFuture<T> future = this->future();4 C, D: d3 q. m% {
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
$ a) H& n1 a9 ]" t3 {% C2 y return future;) o5 ^. X3 z+ D! @
}& h1 ]; a5 ]' m+ `& u5 p
* b+ I9 c8 Q9 c6 B5 x5 J void run() {}
/ z" B, x& E/ N. v virtual void runFunctor() = 0;3 u3 m- V. Z8 W4 Q" n! ^
};
, b; o k& h& O5 ]6 Z; l W2 V" n3 s3 n- y J* [
template <typename T>6 c, V* R" x+ e5 R) I3 H+ `( @
class RunFunctionTask : public RunFunctionTaskBase<T>' L& D% J6 o; r1 y9 b$ e# k
{
# {8 B0 L5 u+ `$ f" Mpublic:
) d+ O4 R$ }2 S' { void run()5 Z$ R% a& R7 _+ M9 s' h+ A0 ^
{
& }0 X) Q7 K* `; L3 ~ if (this->isCanceled()) {
- G8 l5 d( d2 }5 y+ O this->reportFinished();
! o( [9 d; c. _+ l/ V return;- q8 F7 u6 m, C, P
}
" z/ u% s7 }0 V* M this->runFunctor();) f5 m6 O$ P2 i# h3 {
this->reportResult(result);: j' j: b" N3 e7 P' I' t
this->reportFinished();
( \" t% m8 a8 U* k5 a2 t- U, X: ` }- b/ p6 j# h) ?7 u7 C) j6 U
T result;
: E/ E3 c# K2 q0 ~1 O};
7 w3 r' w0 L7 \ ^& k7 R) h
9 y' h7 p1 \8 {template <># r4 S, Y6 ~6 V* m# t
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
4 B. ?; e. Y4 D! c{
! \" m( ]% L; ?; N# j T# kpublic:/ o6 O0 ~ ~3 \ V1 O
void run()( u9 F: T; |2 R/ M
{9 \ Q4 z" L; M6 a+ v, N
if (this->isCanceled()) {
" b- O% s/ A6 j" h/ Q5 O this->reportFinished();
8 O: ~7 |* \4 o' K; I return;
1 j6 t8 S" x8 H1 _, r8 D! n }
6 u: @* N( Y4 V1 o: h% @, l& y this->runFunctor();
% q ]' [8 C, ]) T! A8 w0 g this->reportFinished();, ~0 F" R7 }. p' d4 ?4 y" n
}5 f* {' r/ w" s! w5 d
};
( }5 p1 @3 _6 `$ p% {( c5 f( o9 R, W% m0 c( w/ @- t
} //namespace QtConcurrent+ p ^" D% q9 d
( S% G, e/ Q+ R+ k" k) y( R) V+ E
#endif //qdoc9 E. m7 p0 x& F+ k5 U
) T( u: }6 ^4 Q1 qQT_END_NAMESPACE% e) r1 m* Y$ j. m
QT_END_HEADER+ }( a) U1 W8 o8 C c5 _; K2 {
# S4 p0 @( w' ]' J$ ~#endif // QT_NO_CONCURRENT/ t' [$ |4 U+ b% v: _: y+ W+ ~
6 i2 n9 n3 c& A6 O O; _6 s+ k
#endif& v. f& y; b: w$ C2 k& J
! s7 I$ S' w5 O. z4 i
|
|