|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
, O: ~! n: d9 |' k/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
3 k9 F% O6 e; U1 {. X8 V2 e& N9 }1 C0 n% s- q4 j5 N) `% d' b; h4 {
这个头文件内容如下:
' M: _- `/ ?- W3 q#ifndef QTCONCURRENT_RUNBASE_H
2 H' Q4 A5 t1 h3 N+ }* q8 G#define QTCONCURRENT_RUNBASE_H
6 Z# t1 y0 A! a& g# }, D* x6 p7 D0 S% G+ b$ X
#include <QtCore/qglobal.h>
/ I4 n+ h1 f& O% C5 C$ o6 z3 U8 z$ R- d
#ifndef QT_NO_CONCURRENT7 {5 ^+ z6 T/ A
O. N& m2 }7 ^3 p( `3 A#include <QtCore/qfuture.h>( k; I- P3 n$ A7 y, G3 V! u5 }* l
#include <QtCore/qrunnable.h>
/ X( M1 t3 ^) ~/ E# H#include <QtCore/qthreadpool.h>* s* _" P8 P+ A- ^' [
5 X0 S1 q& g0 l! dQT_BEGIN_HEADER
- c- O2 I" n$ b5 o. }& A3 H3 DQT_BEGIN_NAMESPACE
( r! A" ]+ B; Z* W; z( W/ t& r1 R8 f0 N! I* j) r
QT_MODULE(Core)
' U; a0 V$ s3 Z5 r: K7 R4 Q! e* z; |5 `6 {
#ifndef qdoc0 `& T: ~7 h2 k& X
0 }; t0 ~- L3 B+ m+ q6 _9 m; f
namespace QtConcurrent {5 S" a- J* o. M9 r, g
: @6 `5 U6 r1 n& e
template <typename T>* J4 ]8 u$ m! ^- @
struct SelectSpecialization+ m; }- k6 g4 d7 H
{
' F# v6 B0 p3 Q4 p& I( m# e template <class Normal, class Void>0 E2 m' `; R1 q3 X
struct Type { typedef Normal type; };
$ x( R7 k3 Z) _ A% @};
5 }4 ?' f5 ]6 k7 S2 c0 p$ F( N( i0 x$ I
. }4 b @" @& h: o- f/ etemplate <>3 m g/ v6 R Y; J. l8 R; }
struct SelectSpecialization<void>
* [1 v' o0 j- S{# p0 w4 c2 d8 I$ _# _
template <class Normal, class Void>" B" z# p7 O' U! R! k c6 W' d- P
struct Type { typedef Void type; };
+ A% B+ q- \7 J; x5 Z; P};5 e' R. S! @. e+ ~8 _
8 L3 R( H1 ]; u2 u
template <typename T>
! H, Q4 j- C' a" Y" ~1 eclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
, ^, |* I4 |' N: X4 ]' l{
: P4 ]; J$ ^2 Z( mpublic:
8 k6 X) _8 A5 b QFuture<T> start()
% S# p, _2 O+ r8 o# [1 p {
/ Z* {5 Y- M& f J$ Z3 d this->setRunnable(this);* G( {; i3 }4 P9 s1 h+ X
this->reportStarted();
( @) [# C! O- L3 _% l6 m, a QFuture<T> future = this->future();
. J- G0 J# g8 [8 N6 w QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
5 A w9 [! o( |, K N* [, o$ G return future;
1 _( A5 W2 s8 T: ]1 H9 M1 c8 g+ o- a }
, _6 i+ l3 f, D$ n1 I3 x8 a
- i! q& B- B F void run() {}$ s7 j! } s8 B7 ^9 w
virtual void runFunctor() = 0;
: B6 y* ~) |! {& `( `* B/ X};% u0 O+ t( A* h/ g o- X
1 u9 s/ W3 n: P) h: xtemplate <typename T>/ a& H9 P! A+ \! Q! t; z
class RunFunctionTask : public RunFunctionTaskBase<T>
! W. n& S$ f! `. ?6 r/ O& E{1 Y0 e/ F/ K2 O" o" t
public:
1 F8 U' i1 y1 c1 O- u0 E# ` void run(): B8 l! e! A {+ L* `
{3 E3 q2 x% J9 b* T! z, V$ v! i
if (this->isCanceled()) {
+ c, w. F: n, C; o4 Z this->reportFinished(); l1 M' `% s) ^- l8 D6 H' Y; e
return;" ]8 ]$ R C8 X/ q
}# ? A/ o0 m* E! _6 a( w1 o
this->runFunctor();) I: @! G( S9 m1 d
this->reportResult(result);3 d, g% L) A$ }9 O5 K& D% ]
this->reportFinished();! n( ~4 Y) K- z- k; L3 l* v- `
}
% q4 A [3 H) r2 q5 ~ T result;
6 h- r1 Y+ l! S8 ]% t5 C% |}; x9 u/ h! s; r
7 X1 R" c- B j# |* @ G
template <>" N; `$ g, u% @
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
/ D" k6 a2 W7 L# o' G{1 Z; r8 J4 X+ W# ]: W) Y
public:4 y( d) l& T4 |3 t
void run()0 R# l, N' i- _ \$ u
{3 A z) \6 {/ O+ P8 T
if (this->isCanceled()) {
& X6 D! a" N- B this->reportFinished();
; V/ A+ B6 I" U, _0 F8 X return;( c3 `0 t6 }" z) c" m) B- @
}
* O# f% t( p2 i" a4 _- X z this->runFunctor();
9 t" P7 T9 N k, ]) v6 O0 l+ d this->reportFinished();
|+ S' [1 d9 x! V }' d( v$ Q7 W3 z# p5 Q, ~3 h- z! `0 h C
};
9 J& I) _: W% J" _* T( b2 e" r e5 y: J& r) S
} //namespace QtConcurrent6 b. J5 G. s+ N. R8 h) E0 z6 Z' s
8 E" [0 G8 c8 ~#endif //qdoc
& f; [; A# Z! s$ Y H; @9 O6 }
+ h4 k: F6 F' S4 W! e/ y8 @$ n% JQT_END_NAMESPACE
. ]5 I4 o2 ]. i/ E) nQT_END_HEADER& ~2 Y- v* K* n
) k- C3 {* g/ T. H- n/ ?" u( i#endif // QT_NO_CONCURRENT
$ J3 Q: G5 t' q0 C# n7 b* @$ k) F
3 j) b4 f( a3 b: @/ l$ R7 W0 x#endif
* q7 }, j6 |! L- ?$ j; J; L# \5 t$ O( I4 Z) z' a& j% Y
|
|