|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
& x. d Q% }. ?/ s" |/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'% ^4 \- m( \- z: k
. F, d) x! N4 G" I" w这个头文件内容如下:
i2 P/ u$ ?1 [* C, C2 R#ifndef QTCONCURRENT_RUNBASE_H/ u9 z% y* N3 c# @; L
#define QTCONCURRENT_RUNBASE_H
1 i, ?' ?+ J) {1 d1 T! r5 |) ]# w: J+ P% ]& t' N4 n2 N
#include <QtCore/qglobal.h>
, Y+ D2 ^7 H* [( J L5 I3 P k, i' Q( w8 G% T4 T2 r$ |# M" w
#ifndef QT_NO_CONCURRENT0 U4 t' d+ F1 |9 l' `9 i) U
- F: W& Y7 T4 O* r0 k
#include <QtCore/qfuture.h>
. V- T& a5 ^- l" Q#include <QtCore/qrunnable.h>
6 m' H: c2 a" K/ T: P* [#include <QtCore/qthreadpool.h>9 u& N( K2 ]4 Q2 s. q- w* h
9 ]" p0 i8 a% b/ ~4 J- B- p
QT_BEGIN_HEADER
5 g u3 w4 _# i/ {3 `+ c4 K4 y& |QT_BEGIN_NAMESPACE6 C' R( t: n* H3 [' f
, e' f: Q/ m" T& e( AQT_MODULE(Core)
2 e, ]% K1 G& q
3 C. Z! o7 \( f#ifndef qdoc# i( b2 ]) G6 `; r0 H
# ~; x. U3 V1 { }) m( m' H0 I) u6 L
namespace QtConcurrent {
0 V) D: A- m6 ^& Z2 Q! G, j" X8 b: [- o" @! B# A: C$ Q8 [% ~/ U
template <typename T>
/ u/ G, ?7 l$ ]- S0 vstruct SelectSpecialization
: \0 I$ c! w6 X6 ]1 E6 e) t# p{
& R# f5 _$ ?* F) M1 [ template <class Normal, class Void>
+ D( B8 M4 O5 Z" J2 }# g+ ~2 v struct Type { typedef Normal type; };
" h+ J, l9 f+ {' Q* L};
( t! R( Y( ^4 `) S% U
, ?8 p6 H! O, ], H; J+ d, dtemplate <>( s3 G( k, _1 j9 D7 x
struct SelectSpecialization<void>
+ O) N% C/ @( y+ z{
k8 |3 x- j8 C9 {- ^ template <class Normal, class Void>/ i* [3 {( T. L
struct Type { typedef Void type; };2 e5 t: I- C, X5 X$ `
};2 O% o8 I' f& k
: y+ n) E# L/ c4 Ytemplate <typename T>
, q M7 Q1 A" h4 T$ G& Bclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
- @% G1 p% y* x+ _6 L: f{5 ^1 R* y) q8 `% }; J* w+ |2 A
public:7 G [" o; ~/ ]3 j) u; U2 |
QFuture<T> start()
- r' Q- V: B. ?$ W* y8 G {: W# l, L- r- T( l9 [; K3 {" v! |
this->setRunnable(this);+ S$ x( U0 n& p6 U& B5 h
this->reportStarted();
, c* s$ n# L; m) c% H v% o* A2 d" ~ QFuture<T> future = this->future();' k \8 J8 x* w
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
& b. Z- N3 \5 I# X) z return future;% f S+ H) G# z( Z. w7 v4 U/ g' z
} l5 D) A; ~9 d* L
5 ]3 ]6 c7 N" [! j* o3 a% S
void run() {}
7 B4 l; r0 W# }8 }7 c' ^ virtual void runFunctor() = 0;
- t1 t$ L, p. [0 ]# v1 Z};
& I) l/ }( i7 B8 R5 r7 x' q' m8 ~' q: q- Z, w% @$ z( d3 ?" t
template <typename T>
, s9 c5 E2 R3 \" i" Nclass RunFunctionTask : public RunFunctionTaskBase<T>6 t2 c- S" _8 R! M" H5 B: i
{
0 ~ ]7 [. ]' n1 o! u# O1 Hpublic:
2 T' p2 p& r h2 ^) S' t3 }% q void run()$ c' L# _% p( p% x$ y
{
9 B$ I! @' ^" z! ` if (this->isCanceled()) {
4 x' ^$ O4 L. Y& ^ l. y this->reportFinished();- E! U, `, n- z+ j& ~0 m7 \$ K
return;1 m& _. _0 ?0 ]4 U
}
% s; I3 l: @" g- A4 v this->runFunctor();
5 B. [1 c9 `: _ this->reportResult(result);* Y. |( \1 b% o5 [5 U' @
this->reportFinished(); w9 }$ ~ L1 |* ^( s, S
}& V4 m* z9 v% g/ h
T result;$ f& Q* G; ^2 |# H7 D0 u$ q
};
/ F! n8 A# L! n. J- ~
2 M$ o& L; @0 u3 F% m, J8 qtemplate <>
# ], e* [0 J0 T/ P% {% V/ i$ w- ]class RunFunctionTask<void> : public RunFunctionTaskBase<void>; k }3 A. s7 w# q# X
{
7 Q4 D9 q% ?( X5 f! M* n- Xpublic:
; d8 t0 b4 _- o9 `; y void run(). d& a7 G( N. [+ G
{7 Q# T% ?8 @1 t* C
if (this->isCanceled()) {
! @. |! X) s: O( s$ r this->reportFinished();
" v0 l1 c, ~+ [, o; S5 A return;
2 [: Q3 D) P) Z6 T7 n4 f; o }: |; i8 } T5 v9 W$ R
this->runFunctor();
2 ]& ~4 ]( K7 c/ V% f this->reportFinished();
( w. {" _" w C }
; ~6 H. r( s! N3 r- C. C};5 x$ C+ o# [+ T" Q% r7 X
' m2 {' x. P4 O
} //namespace QtConcurrent Z/ o% N0 V N# ?7 c/ ]
/ n+ R0 m: v5 z* b z9 s+ e3 \( e
#endif //qdoc% P n3 l6 f6 g d& t* r: W2 h+ X6 X
7 J2 P3 K) W- R& x1 t
QT_END_NAMESPACE
+ n; M, ?0 B3 X( P/ Y3 k, jQT_END_HEADER4 {2 O0 n& c# R% f
8 E; u" Q' p8 t1 C% W
#endif // QT_NO_CONCURRENT
+ V: U) y3 a! S9 f2 d
' O- K0 k8 s6 m#endif
; X4 F5 j9 } v
' Z9 k/ k$ F6 k) I# |; M |
|