|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
1 f D S2 k! B0 t0 q; H* P/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'- S4 ~% Y: {2 ]( v v. _3 E6 j
/ B1 X- i- s. J% N7 \$ v
这个头文件内容如下:
2 ~7 s3 ?$ g/ @( a1 ]#ifndef QTCONCURRENT_RUNBASE_H8 |7 C, X1 T2 q$ M" N4 e
#define QTCONCURRENT_RUNBASE_H ?8 O3 e- Q% l P3 ~: t
( T+ K5 g6 e) z) y h$ r#include <QtCore/qglobal.h>
% ^" R5 F$ s9 i1 w1 C4 [2 g p+ Y1 H% v1 W
#ifndef QT_NO_CONCURRENT
" a- ?" m, r6 v! B* X* i2 T7 h! M J& i/ A [; O5 A) y: I
#include <QtCore/qfuture.h>2 g7 v! t9 U( r4 C
#include <QtCore/qrunnable.h>
3 d0 l- b/ O6 J) I1 k, E1 R3 E t#include <QtCore/qthreadpool.h>4 a. n8 e b0 M0 K! ^+ s* P% u" q6 K
0 u5 ^/ @4 p8 V, |. t
QT_BEGIN_HEADER
7 m9 v/ c/ B+ I- t% ~QT_BEGIN_NAMESPACE* z, C, E/ X: s$ w# G; L
( g/ Z0 G. X6 W1 q/ r
QT_MODULE(Core); g+ D! U8 h9 j& y$ P, l9 ?
6 D8 g8 n8 P8 @ J6 z# \0 [7 J
#ifndef qdoc+ [9 b) ~& {5 E9 O- d
3 \" r6 [. H8 ?- S' f* ?namespace QtConcurrent {
( [2 `9 s5 X$ K h' _8 Z8 m7 m& U6 d! N( Q- X
template <typename T>7 B* \3 x' |( p, T
struct SelectSpecialization# U, I/ _5 y& Y4 J
{6 W& [' N+ X# x. p
template <class Normal, class Void>/ T0 U8 s" I. K' T, v: ?) f# E# u5 n
struct Type { typedef Normal type; };
# ?, X3 r! w8 ?* G};
$ h/ W3 a% R$ N9 E3 a y/ O; y8 G% P' i8 F& X% h8 R
template <>
, w8 \4 [8 @; Q9 w3 l7 ~- i9 Mstruct SelectSpecialization<void>
: D: `1 w- y+ K{
) _) u& @! T2 e% ] template <class Normal, class Void>& ^. N& V$ ~' m- C
struct Type { typedef Void type; };( i$ M2 Z. m% M6 ~2 d+ ?
};3 z- G- O$ o# d* a! `- c u- f: c
5 [5 B! X$ g O# Vtemplate <typename T>5 N! y* Q! T0 ~9 z1 F
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
: [' M! a/ E- }, y1 }{
! v$ y6 `/ A3 I& C# x8 j+ ^4 c( Npublic:- J) h0 ~/ u5 ^
QFuture<T> start()
: y; `8 }/ }0 `; y {
1 N- O! y' H2 l/ n7 Q this->setRunnable(this);; t. K) M) G' w+ t/ I& W( l
this->reportStarted();' F: D0 u, d3 N, Z9 Z
QFuture<T> future = this->future();! q8 I* Q( Z0 q8 h* A0 x* q# ]
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
$ P' i3 k R3 x& T6 A9 K return future;
3 P' S+ j+ o2 n1 [, j" G! L }
6 b% s8 _# C( f# T* \& B" ]' q/ h0 V2 k3 y/ U! O7 C; }9 h
void run() {}
5 ?2 c1 Y" e6 H1 m3 d virtual void runFunctor() = 0;
9 k, K3 W! j& c8 a- a};
# g, e. s6 \& J' I% F( `0 p$ d
7 f6 O7 n( \+ Gtemplate <typename T>: y* ~' ]; ~9 N7 O1 G
class RunFunctionTask : public RunFunctionTaskBase<T>
7 s, a( W% M$ E" A9 e{! _; e7 d5 h8 k1 i( @3 o$ U* k
public:
8 ]) u$ }/ g6 o7 V G0 [5 A1 i void run()
6 ~; K/ m+ ~ D3 g N {
1 M/ Q/ N+ t% P5 B if (this->isCanceled()) {4 X& u# M9 z8 w
this->reportFinished();
$ }7 [0 S2 D7 U5 q7 @ return;
- H' i9 b: U: o% j# f* @ }+ q& M8 {) F7 v$ }
this->runFunctor();
4 g! j( X. ]. H6 u/ I! a this->reportResult(result);
R* O5 g. h0 N this->reportFinished();& ~2 N7 w. N% z7 f0 e b* f4 g
}
+ j3 {# G7 x/ B( p T result;. x" U3 O9 Q, Y1 E) S
};
- g" k' E* N( z' h( a! c" I& Y- b; \& d! L8 _& K
template <>
% X# B: y6 \ F0 y, U5 J( Jclass RunFunctionTask<void> : public RunFunctionTaskBase<void>
q8 r, S2 x$ C8 f3 }{7 H. \' o$ _0 q6 A i, T) z) O- F
public:
6 w5 r3 x/ [: } H/ \ void run()
- ~- r k' a8 q7 s9 v: i. r {
2 C5 {! n- M L" }) |" {& h/ o6 I if (this->isCanceled()) {% |/ h5 E# y3 B" s" g4 c: x% a
this->reportFinished();% i0 l8 J2 E* z3 W
return;
9 p# N% ^1 G+ f }" U5 |5 x ~, p) R8 U; v" z
this->runFunctor();6 S8 F$ H: a3 K
this->reportFinished();( \5 p+ A6 E" G: R+ p* h
}
/ q3 P0 g8 k2 f, ~; D. C};
" ]6 x: r% [' y5 \6 a$ {7 Q& S" {. B7 S
} //namespace QtConcurrent6 K. ? Y- H$ a4 z
+ g D$ \, w- O6 g8 L
#endif //qdoc: q& T1 r" _3 S! e Y
7 u+ u+ f1 A5 H* T% O" k
QT_END_NAMESPACE
5 T2 C- Z/ b. P! | y4 cQT_END_HEADER
. H& o4 D% x- I4 y# n) |( H
0 w2 [3 M( u) |5 y) B: f6 m( }#endif // QT_NO_CONCURRENT6 U3 U: B$ p1 V
0 m/ B9 D* }1 k" v7 y- W9 y# t
#endif
. E. b6 K, O5 u! n! q Y
' z/ z5 B4 W8 ?% F r% l/ J, I% ~ |
|