|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
- M" [- Y' Z3 Z- W/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'- v) z! y) _; }' T) F2 O
2 D) o r) N8 f/ {! Y4 a$ G+ m
这个头文件内容如下:
1 P7 N8 b* O" ^& y9 H/ a#ifndef QTCONCURRENT_RUNBASE_H
1 _) \7 Q# D H% j$ }#define QTCONCURRENT_RUNBASE_H2 N9 k: s0 h7 v J! X/ ~
! n- x O6 u8 i4 s
#include <QtCore/qglobal.h>) E. K( t6 A4 B
& Z, r0 n: y2 @3 [. q( a F
#ifndef QT_NO_CONCURRENT
1 ^* i5 [% _0 L* b3 Y6 S. d9 m1 B; [; W2 c8 Y f' Z* L; P/ d
#include <QtCore/qfuture.h>; t9 a& C( D' X0 U7 R
#include <QtCore/qrunnable.h>
+ u* @, X {: C* M# v#include <QtCore/qthreadpool.h>
0 c: V1 a& Q5 ?( w, n, {9 x& `$ B& x! r
, h. t9 n3 K, U. d2 SQT_BEGIN_HEADER0 T7 v0 N# Z0 L3 c- m
QT_BEGIN_NAMESPACE
3 g" y6 w+ P6 W- T' y l4 c, l# i! `) Y0 }. o% Y$ t0 u9 R* J) G
QT_MODULE(Core)6 u5 G5 K' R0 B% `
7 x( Z* k8 N1 U& j& e5 J0 [7 o) m#ifndef qdoc
! z& f& b* J0 ]6 p3 C9 b. ?6 i0 m* q/ _* h2 n' Y; G" x9 R2 J, `
namespace QtConcurrent {+ @+ ^2 i3 d# u
4 o4 Q. X: f& M O% rtemplate <typename T>
# b2 k# c0 x- Z3 M2 h) h! ustruct SelectSpecialization/ V8 Q B8 s3 W2 X/ ?; e2 v2 X
{
5 B4 {9 m2 y& r- p" O* |* ]! e template <class Normal, class Void>
0 R0 w5 ~) C' I, y$ G struct Type { typedef Normal type; };( ^ r8 |$ r; |* h" m7 D
};* E: g. o+ R$ a6 k4 s5 w3 Q. m$ A
+ ]/ y3 B x% d6 c- E# S) K! a- ~
template <>. e1 l: M1 e, P5 g' w
struct SelectSpecialization<void>
( C$ }9 H* r4 A6 ^5 j1 m{
C: t6 \% p2 p( q template <class Normal, class Void>8 ~+ n' T6 _8 K }5 r7 e( x
struct Type { typedef Void type; };
5 q3 |/ O8 x1 `" b8 ]/ R};
6 v0 s- @' P" @) v0 @2 V5 d4 u8 N' i+ t( I
template <typename T>& Z; j/ l3 G$ t
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable& c" e3 g' `( p4 W1 }, ^! k
{0 t: a- R3 N& _4 j) g
public:
' {) L" Z! W8 _, N8 ]4 X QFuture<T> start()2 a6 C2 T! B, B6 O8 \% r
{3 \* N2 }) j" w0 S: s
this->setRunnable(this);
; s$ H& J9 {" Q/ l; S; R4 q this->reportStarted();
6 M. v% g+ H6 w/ ]5 L& | QFuture<T> future = this->future();6 I5 n- [9 E+ |
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);, P, t# T! Q! D, y' X2 e
return future;/ S$ f: b3 B! i% f. U5 S( D
}
8 q$ u% {+ e$ C: E
% D+ a' x$ X G6 ^1 Q# m9 W) M void run() {}# u( n" C1 l- P$ D* g! q2 k: Y
virtual void runFunctor() = 0;
$ G7 K" D1 t9 a% h};
: n. d! g/ f7 k& R" j! e, Z
/ N7 z* a+ g# z- Utemplate <typename T>9 r; q& ?3 A3 R. ~; D! C1 S
class RunFunctionTask : public RunFunctionTaskBase<T>
8 ^$ F( m( T4 d: ~, f ]4 L( q{
5 Q$ g" [; z8 ]7 m6 Npublic:
" i, {% }) y7 k0 f void run()# j1 r7 U- Z0 J' p
{( x, d7 i7 ?9 M, a; q7 Z; A# m
if (this->isCanceled()) {
3 q' v; U* ^) W. Y4 z this->reportFinished();8 z3 F" q* i& w! X
return;
8 d$ L7 S: O( d G9 r6 c. \ }: y+ e! e3 V4 L. M" l& }& B( d! ?
this->runFunctor();
1 }* \5 O. Z0 z! \ this->reportResult(result);
9 ?7 N) Q+ c8 H w, Q% @ this->reportFinished();
2 c; M2 ^' u. _: c }
5 E8 S& ]$ S5 u' c; n6 H, N4 V T result;7 F7 [+ p4 B d$ ]# s. U! R% |: q
};4 m0 _: h, i6 [1 v' r+ u% F1 A
+ a0 H% |: }# k0 Y& B8 @1 c
template <># T, g3 p; i. H" ~9 x
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
: R" g! A# U* \; V [- C5 U: T6 A{) @1 ^/ |0 M. S
public:3 c. |1 l8 Q+ G' C/ ?5 J
void run()
( S0 O% _; o: o& N+ `4 d {
0 A2 m9 g; ]) i7 G3 M: u if (this->isCanceled()) {
4 [3 O* W/ a7 ]9 H2 @ this->reportFinished();
" |& a' U8 V5 i" R3 ] return;
- V- ?, i3 @, y! E/ `+ D% b }
. H: E" P' I6 g4 {# ?' C this->runFunctor();2 u. u+ _; w* G, _' U
this->reportFinished(); ^# R9 V7 ] c5 F! m
}% |5 g+ T% ^( E( w! c
};! E a" _( L2 Y0 | ?
* K9 t# f( Z! Y" ~+ c} //namespace QtConcurrent
* b" n9 ]: K/ f# H3 K0 a4 L! R6 m$ `2 ]* q1 U$ \2 G8 a
#endif //qdoc: C$ F% t; M5 }& g
8 B! s. A+ F3 _5 G& g9 F
QT_END_NAMESPACE
/ h0 F' i9 Z9 _2 C% ~- AQT_END_HEADER
( t! x: f$ l _ L6 |, ^* C9 w0 P8 n0 J% m2 ]( ]& P$ y
#endif // QT_NO_CONCURRENT
2 f0 Y, k) H) k: T8 [9 g
8 B1 B% X$ j9 j. G#endif
. M8 @# b+ d( I# b! L. [- o, x+ v2 B* o& Q+ m1 e1 W
|
|