|
我对syslink进行交叉编译到arm,但是出现如下错误:& c) F( ~( d% y- I: 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'
' {8 L( p% w7 n3 w# d% o6 m5 r2 \5 B5 F8 n+ d
这个头文件内容如下:2 T; l5 Q$ l5 }, {
#ifndef QTCONCURRENT_RUNBASE_H
0 h; P' q5 B2 \' L1 s& [9 v#define QTCONCURRENT_RUNBASE_H1 J) w; A7 D& ^) I1 c
3 u& y5 f4 C3 ~9 a* X: f' ]
#include <QtCore/qglobal.h>
" V7 N: v* A! g- ?1 c. l, B+ x- P9 k: r1 ^# Z
#ifndef QT_NO_CONCURRENT
% A4 d. u6 @/ F
# U' a5 q ]3 K6 u7 i$ ~2 e! _#include <QtCore/qfuture.h>+ ]) T9 a5 [& H
#include <QtCore/qrunnable.h>* L6 ~. Z, E$ p- S
#include <QtCore/qthreadpool.h>7 p! i1 ~* I- |/ |. Q2 ^
; o8 s& a9 G3 Q' tQT_BEGIN_HEADER
3 Y) l* s) R$ z3 y- yQT_BEGIN_NAMESPACE
- N8 C' q% a$ E% k n- {3 X# m2 O& O
QT_MODULE(Core)
( {+ ?7 T0 C0 o7 \7 [: T6 H8 y2 _, e6 _% l! ^7 d
#ifndef qdoc2 w1 I; h1 A8 d$ i7 _
* c- H* n9 f" f1 K
namespace QtConcurrent {
' B/ J' L6 V, S) w+ h8 f/ z- O+ m% P# ~
template <typename T>
9 M) ]- H+ Y% E0 I) _struct SelectSpecialization
6 S5 |- B0 Y# `# p7 l& ?& m' W# }{0 _, G- ?# ~5 x# M% n. g
template <class Normal, class Void>. W2 {5 |1 P$ j
struct Type { typedef Normal type; };! S$ H) E; Q+ G* w9 U6 }, P' f1 R2 \
};
r! x+ ]% V9 }
N; i/ [: z& {$ A7 ~& k4 mtemplate <>
2 W) k, R `2 ]- E$ |7 ]/ {4 Xstruct SelectSpecialization<void>: b1 g2 Z/ m: i, R
{& c8 _( w& u5 `2 @: [
template <class Normal, class Void>
L- a8 A5 |0 H# d struct Type { typedef Void type; };, Z+ e+ H- [: } k. u: c" J- C. V
};2 a0 ?% y( s3 T! S+ r5 s
& a2 F" T* d* Btemplate <typename T>1 e% q7 p; }- H+ Z- e
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable/ ]" P" N" H' s( M; j9 p- m
{- b ?0 X* _$ C: V H' r
public:
: Y. f V4 p" @; _" E QFuture<T> start()9 s- O+ t. Z, W V4 c
{
1 H9 ?/ h) v0 s3 {* b, F. k this->setRunnable(this);
/ Y7 i2 J7 q, ?4 Z this->reportStarted();
g$ F1 n. n' d3 t, d) L QFuture<T> future = this->future();
0 g! l+ V0 k' X: ]6 F8 l/ [- m9 X+ v. | QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
0 J5 d/ e- Y0 J7 f ~! {7 d/ ?) T return future;. V$ r$ O% h1 h6 c, G
}6 r5 e% E x2 b
- K; ]' ]& y! Z6 }+ M( O void run() {}
8 j3 d0 d* [6 ~5 C6 h' Y7 t; T virtual void runFunctor() = 0;
; R8 i+ n( Y# E3 U+ F/ e};
3 |0 s# h9 k+ W: z$ n& _, k5 O" F y; S9 a, M" M9 n
template <typename T>* y0 r: o: I) k. m4 ?9 P8 g
class RunFunctionTask : public RunFunctionTaskBase<T>9 k" H; E3 b2 N/ S& T+ U
{
0 ]$ e: ^- n- E5 d) npublic:
% Z) x4 a5 ~+ H8 v1 M void run()0 P* N% ]# V8 X+ _, V
{
2 m, g4 F6 Z1 |! f if (this->isCanceled()) {& t3 J* x2 `+ f3 p' ~- D- A
this->reportFinished();0 ?7 q! R9 |9 \3 v
return;
- ~2 w* q* j1 Y% l }
* h4 |; f/ v7 g4 i$ r1 Z. d this->runFunctor();
$ y- c8 r, J( Z1 j n- @$ K |5 w this->reportResult(result);9 x- R& x. q6 S% _5 b( `6 f$ _
this->reportFinished();
& b5 G& v9 E$ U$ z |1 S' P" }' K }6 X0 P9 M/ k4 p5 Q5 w: ]2 t
T result;
H0 w- m9 f* Q5 x4 w7 Z+ V4 b. t};
# x0 C( E) z" I; Q2 Y3 J6 \' L
1 g- l8 W" T0 n. f" H4 }" ktemplate <>4 ]; x( a* m5 V+ a! m+ B5 \8 I
class RunFunctionTask<void> : public RunFunctionTaskBase<void>( K% k" C; Q; l
{ ^8 T* @, R* f6 M w8 D$ z
public:
$ C% e- V, H. ?0 J void run()
1 [. o" v% [. P8 y2 S6 h! ] {- s$ v+ R( `* K! l- }. y. Z: f" i
if (this->isCanceled()) { e3 d# X5 d2 b: V
this->reportFinished();
/ Q- ]8 l- T# p0 D$ T' i2 n return;
8 p5 s+ o% [: A: i$ f* W4 x# ^- x; s }
1 }7 U# T4 H$ t) r. j* n/ b this->runFunctor();& K; ^+ R- u9 b" O. x
this->reportFinished();8 s3 J1 I8 U4 k& K* u+ ]. i
}
& t. h+ S' a6 P: {9 L% [" m/ w U2 e' T};
% Y& h! ^, e, f1 L d4 G! c$ ^( p/ o0 J+ P% c9 X
} //namespace QtConcurrent Y) d% A& c% {- P! C
k3 v" q0 Z" j- T/ u! d8 X
#endif //qdoc2 y+ s# Z. g6 w
6 _% E3 r- t' r# x$ }
QT_END_NAMESPACE+ J, g" {1 w7 [* A2 r" V6 O( E
QT_END_HEADER
7 w" S, g" T z* V5 I7 p# d7 n
" k! X j: c7 u, a8 A" g z#endif // QT_NO_CONCURRENT
' @0 {3 i( @9 s0 j6 ~2 D i, z# Z2 h: ~
( y) \. `: p) U J#endif
+ d) `" J. G9 a$ f6 w
# W0 e6 ]4 L6 e1 ?0 g( A |
|