|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
7 X, Y& m0 b! a/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
* V8 m% E8 e7 ]4 w7 M% A3 S
) j5 \- j% q* L8 c" Y6 I这个头文件内容如下:
; F. ^8 S3 E' l7 G# ^' d% K) K6 \" z#ifndef QTCONCURRENT_RUNBASE_H
- J% m: r+ R0 R9 F+ k* X7 s#define QTCONCURRENT_RUNBASE_H
& f& V! e U) I% e3 K, J$ m1 O
: n8 V. W9 t8 _# B#include <QtCore/qglobal.h> N) k! T8 X- \; N" Y
. o9 E& x0 m3 x5 S0 w5 @8 p6 c
#ifndef QT_NO_CONCURRENT0 J1 ]+ D8 w" g
0 b7 u- E. R. T' L9 s& w1 l* _$ Q
#include <QtCore/qfuture.h>1 k4 e6 {' Q3 {1 j$ \
#include <QtCore/qrunnable.h>; I* ~& E& b) `2 S9 e" k
#include <QtCore/qthreadpool.h>$ g7 W3 x" G: M* X' b: {) G4 p
. ]2 p" P+ E; R$ m$ ~. z+ U4 p) ?
QT_BEGIN_HEADER
$ D7 a3 W! D2 b8 g" s8 C) _2 F! yQT_BEGIN_NAMESPACE
: {/ w( F# I- e6 l$ s, V( ~' u
9 k$ N( ?7 m }7 ]/ i8 G: [8 @QT_MODULE(Core)
) P( m# T$ V' K7 r( A3 a$ i) ?- b0 {- W! b
#ifndef qdoc9 U$ i" J1 J! D0 F3 Y4 b2 Z2 s' V B" J
6 `, J/ l7 V. ~& D d
namespace QtConcurrent {
0 ]4 q1 p j) J: p4 d8 S* U: f+ P6 Z' v
template <typename T>
5 I3 l+ \7 d4 @8 Hstruct SelectSpecialization
/ |; {5 H' E) O* z6 t0 [8 i{7 t% t, B) T c ] A2 l3 a# G; e
template <class Normal, class Void>; t2 E% \: O; Y- \6 \( ]% s7 ?
struct Type { typedef Normal type; };
; U( C! c8 D, h& g7 E: N) a};- v) g! p9 L7 w
) c3 W; F- P' u1 F: k
template <>6 d, Q8 v7 r2 ~9 q- K
struct SelectSpecialization<void>
; V0 K9 E- d% k! H# u{+ V) r# I' v* \4 W
template <class Normal, class Void># F% b$ a+ `6 K, `
struct Type { typedef Void type; };3 Y/ x8 y7 Z& B8 b$ X
};
% n! |+ J9 P1 z. }
* d! Y% ` D7 ~- K7 B! ptemplate <typename T>% N" L6 c N: {5 Q/ [0 I
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
% P e, D+ U9 W/ r3 f{
- b1 k* J: _$ u; m! dpublic:
5 y8 `, x# F2 t QFuture<T> start()9 _& {. M; A0 R! F+ j
{/ k# y( Z) u+ h2 }: I, t4 `& `
this->setRunnable(this);1 S0 U4 u" Z5 L7 n7 a$ _
this->reportStarted();
; _& Y$ m/ W$ r( D. R' ]4 |* | QFuture<T> future = this->future();0 \. a1 J8 @, ]+ x' f; u5 R
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);" g: J) U: h* u+ g* U& V# r5 j, M
return future;# K# a4 V6 M. ~" t6 w3 w/ E
}
7 p$ u) x# j6 j) G/ J2 ~! b8 m; ~+ M, ], Q
void run() {}6 l" g( e6 P2 L1 I o" l
virtual void runFunctor() = 0;
; d6 l8 G) }4 E, R+ S};
; _5 b6 ^) b/ O+ R: U! d* G- a9 d+ G2 \
template <typename T>
. [- F2 @: e+ I5 {( x. ~" ^class RunFunctionTask : public RunFunctionTaskBase<T>
M; p" }* z3 X4 r# L% ?{+ x6 ?$ B+ a7 r
public:
+ }: |' I4 k7 z+ y4 Z- V# z2 d. { void run()5 W8 }2 @+ M; @6 @/ n$ ~
{2 M; Q, V, D5 ~3 U9 Y" ?
if (this->isCanceled()) {
, T8 O2 Q! N- L1 `$ B8 h* [8 x this->reportFinished();
4 i+ h1 h6 ^& l- u2 h+ o# H return;- X- P- P& f3 }) ?6 L e; Q; y
}
/ P# F+ b. A. A2 F: s this->runFunctor();: S" B* f j7 g8 l
this->reportResult(result);
6 y0 U5 x) ]2 O) b& B" K this->reportFinished();
5 J9 E" S+ @3 J5 W }
R# d) o( V( I1 X T result;" I b1 i4 S; V2 {1 X
};) N; B- T( s5 \# h; O
. Q) [7 ^7 f: S/ N/ ntemplate <>% S8 N8 _& W+ ^$ v
class RunFunctionTask<void> : public RunFunctionTaskBase<void>9 O9 C7 a f! B4 D/ V
{" Y6 M1 @& k4 M) l
public:
9 Z- t% C* E: t Z1 e, Q; E" r& j void run()
, ^9 z$ Y: s) j0 c! W- q$ z {
6 Z, h5 E9 S$ s: F# n, Z" V if (this->isCanceled()) {. f1 B, f, c; d( f. h: P
this->reportFinished();
% N' P1 L+ p$ K return;
1 N9 [3 p F% s }2 j2 l) D. @: I# R" _ }
# C: p" c& _* O5 y+ g# w this->runFunctor();# ^' o7 k5 f+ o8 B: ~
this->reportFinished();
/ Q; U, O* u% w1 m9 W; j' S }' Y9 G* A/ v' Y+ q5 Z
};" ~6 _1 \- @" \5 N
/ B& M7 h( n; v" f' q7 c. S
} //namespace QtConcurrent6 @9 ?5 `) P3 m: U# ~
. ]1 r; W x& Q. {3 O: G
#endif //qdoc
8 B/ s; s: Z* H2 W$ h7 W9 a8 |/ D6 N; S. X7 s
QT_END_NAMESPACE, l7 _ k% L/ P; _( ]
QT_END_HEADER! s+ S6 @' `: f- @8 j3 I
9 ^" i8 k0 [/ m- { l2 {
#endif // QT_NO_CONCURRENT& T6 V; K" g1 C- r( e$ [# I
" _( a& V8 S! Q; [: H3 Z#endif
+ }6 i" H$ o$ q" P! i: r3 b. o% Z
, @5 l% P4 L3 A) X2 t* f |
|