|
|
我对syslink进行交叉编译到arm,但是出现如下错误:' b& @6 T- G; t) ]" O/ y7 ?+ m
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
+ P9 w: p- F: z3 y# ?5 R/ X; V' a* G8 {# O: w8 \7 D
这个头文件内容如下:
8 \6 P" x& o6 P#ifndef QTCONCURRENT_RUNBASE_H
$ O9 d5 E7 K7 G* A#define QTCONCURRENT_RUNBASE_H2 R( B/ S2 L( w! t v2 k) L" r/ v
# U# E8 r; E- P4 `#include <QtCore/qglobal.h>; h$ L k5 |4 W M
6 K/ u6 |+ |2 }# C$ u#ifndef QT_NO_CONCURRENT @' W$ d0 ^, l& i9 o
- ` A" @' |1 p& a$ n9 N#include <QtCore/qfuture.h>
6 n% W( R' p' D# u B#include <QtCore/qrunnable.h>% P$ Y2 ^: Q8 B6 y6 t
#include <QtCore/qthreadpool.h>
8 T; \8 P4 h; M6 v+ l8 c
1 A% R4 N% g; QQT_BEGIN_HEADER
. R" X O& x9 w+ y/ aQT_BEGIN_NAMESPACE
+ Y8 N c" b/ |1 y7 ]" w5 ~* d4 z) H4 b; s
QT_MODULE(Core)% I0 R: V8 ~1 k3 y( P: g
& @3 a) q) w& }/ F! D7 F; ^
#ifndef qdoc
1 x) `; j# u) f# Z) k: y7 M
: |* D3 F# N: E, ^( o. L& n, E! B) |namespace QtConcurrent {% v K3 E/ K2 T2 {
1 w% r3 B* J9 `! _$ u# ]
template <typename T>
' @, N# E2 T/ K- h' vstruct SelectSpecialization
6 b% J$ F* V) e, {; |1 n8 J8 h{
" s }. U, i q; R template <class Normal, class Void>& N5 _+ |& x( g$ s2 C. w
struct Type { typedef Normal type; };
4 {/ Y! |3 k, H d) f! M};% s8 t2 P$ R: g2 H R& t) @
% }2 c) v$ P R, w F* L
template <>
$ Q' z. y+ \. Tstruct SelectSpecialization<void>
4 i# B/ H" u I/ b/ z J{; d7 M* Y9 Z H/ n
template <class Normal, class Void>
3 H: q* e6 ]$ `% `& w struct Type { typedef Void type; };
2 r, n5 Y) P" A5 k};
& q$ R' i4 n' n$ b9 J) U6 i" P% {7 I+ e7 j, x2 ~
template <typename T>% N3 ?/ G& W6 Y. b: o) z6 k; A+ [4 q
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
* ~) G4 @7 B* c q* w) x{
. K- r0 v( E2 t- Mpublic: q" ^4 w* w! m. I
QFuture<T> start()) y9 v/ o/ {+ O7 Z3 w7 R' Z2 b1 V
{, f$ x! n8 h: G3 F
this->setRunnable(this);. A- f Y, P5 x/ G
this->reportStarted();! B8 L X2 [7 f0 I! H; i% A* `
QFuture<T> future = this->future();1 X! i3 w' c7 d
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
! {- y3 _- T3 u; [" n7 {+ z return future;: ?" R# I" w7 L; O
}
$ `6 z. o/ x9 B- m. \7 \% h+ c$ p6 X# f9 a8 M# ^9 ]8 B
void run() {}
% A% t0 q+ Z$ w8 [2 j virtual void runFunctor() = 0;, G; x6 z9 Y4 f' P
};9 k! m! R4 j0 B( w4 b; C1 G
- V' w3 F# x! `) O7 Q/ Btemplate <typename T>9 S- W1 p- N# T
class RunFunctionTask : public RunFunctionTaskBase<T>
. p! a; b) ^+ ^4 N{
- M$ ~! a: g2 Z/ ]" z+ upublic:
0 K: T* h0 q% v1 h& z; ^2 }: j void run()
r$ e9 N, v/ i9 v! G4 U5 P {
' a9 \4 J9 P) J! \$ p% O if (this->isCanceled()) {
0 a( Y$ @5 I/ e6 O3 C this->reportFinished();
. i0 c9 b4 ~: [5 i, p1 W return;
9 P+ F9 M# p/ v( a4 e }2 Q r. A; R8 k" _" o
this->runFunctor();
% V+ U6 {* l5 X- h' `$ ?% p8 E; K0 b this->reportResult(result);8 O: r2 _- x5 S/ v5 G" D& d; l
this->reportFinished();2 r( X( ]/ e8 r* _% i% W3 y" u
}, }- v0 L/ m3 @9 N
T result;
) L- v T, G* V$ O' `8 t; ]};
: o" m/ C- Z( W t! e
]; Z0 U% W2 R9 O* Stemplate <>
' V1 J5 t2 q5 ^; I7 vclass RunFunctionTask<void> : public RunFunctionTaskBase<void>
, Z0 T' u3 G/ B, \9 N7 @0 ^{3 S9 J0 R3 b5 k6 [9 d
public:* W' r! \* \% q8 ~. S$ J
void run()4 L: ]. P: c3 I1 Z3 c
{0 t3 `; {, n! I) ]1 p& N' n
if (this->isCanceled()) {3 Z n7 I' H% Z' h( u. G/ c
this->reportFinished();
4 d& ~# r- W& g" c/ m6 m( R return;
. m6 H: b! M) M4 ^ }
6 d, K( i5 [1 W2 E) { this->runFunctor();. }1 K! A5 N4 y* Z2 ^/ E9 ^
this->reportFinished();* W' S' O3 s. U
}- `; k* ~' E t& Y5 I+ F3 K* b, K
};
; Y$ t9 O& L1 N, A& i! B& f/ N1 a1 l) T
} //namespace QtConcurrent0 B5 x) z5 Z2 q' D) M# _* {5 U
' p; r, N2 }4 c: N9 z/ b4 s
#endif //qdoc
& ]) `( \- z% H5 l8 W' D6 D; v, V' k% x
QT_END_NAMESPACE5 M6 t" d5 Z# L8 ?3 [7 G
QT_END_HEADER
9 e! ?- H3 K/ C2 \
6 K8 ~6 O/ O8 h, ?* t2 L- I#endif // QT_NO_CONCURRENT% l1 S' c5 `0 b/ \5 Z2 V/ B
* O/ n- v+ j Q$ G8 ?
#endif
; W; l5 t8 i6 k: @, c# Y. U" j; [( O6 y- Z
|
|