|
|
我对syslink进行交叉编译到arm,但是出现如下错误:' w2 m" ^2 z0 @0 O1 Z
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'$ q; e% K; k* _- {& L8 W8 x8 |) L
# K" v0 k- v) E% C4 H- d
这个头文件内容如下:# g/ C$ D. r& a; t
#ifndef QTCONCURRENT_RUNBASE_H1 ]% D) H1 ^% ^% X
#define QTCONCURRENT_RUNBASE_H) f6 f0 u- U4 W' C4 s/ Y
3 N- t2 i9 T5 D) y
#include <QtCore/qglobal.h>
$ f( C8 N# s M6 e+ k4 Y4 q: c& O7 l
#ifndef QT_NO_CONCURRENT1 n! \% t+ @& c; \( Q/ Y
s. v$ E6 ~6 B7 D+ w#include <QtCore/qfuture.h>
6 d1 U& d; c7 g) [' E: l ^4 J#include <QtCore/qrunnable.h>. z. n6 w1 Q$ i: B
#include <QtCore/qthreadpool.h>* `5 Q t5 v% c2 W7 `0 I
7 t- L6 _6 H9 q& cQT_BEGIN_HEADER
, \( p6 N) Q% @QT_BEGIN_NAMESPACE
8 _, ^3 x8 L& T) c' m- T/ J2 _. U2 r
QT_MODULE(Core)
8 m5 d: K( T+ N, E7 c7 }$ B
# O4 o4 D% V$ g. D9 w7 s6 c3 w; O, p#ifndef qdoc2 m4 ^0 {* a! \4 y# H( b+ l
0 n( O H: x9 S5 g4 @( F: k; F; S1 m
namespace QtConcurrent {% ^. y& \' y( o- V' j/ s8 Z+ j
( K. w+ ^2 o/ Vtemplate <typename T>
: o6 Y! T/ ~9 jstruct SelectSpecialization
7 @3 s ~0 U) Y0 Q. P{! [- R, }; }# j: [5 L
template <class Normal, class Void>
2 ~( N- S x8 Q3 {$ n struct Type { typedef Normal type; };
6 u V9 b" Z q |};* L- K" g" u$ _: N( h- P
! t. q: p4 x O3 @, rtemplate <>
% a' [5 {, J' r3 N8 \0 C* istruct SelectSpecialization<void>% H4 q+ e6 ]( l0 ?- G; b9 |1 B/ E
{2 o3 h. c/ _* }( j
template <class Normal, class Void>& w' F3 g4 k- l4 R7 m# I6 G
struct Type { typedef Void type; };
4 y: \4 J4 b. S# X" j};) T# J. z" }, z7 G4 g( y6 Z
2 q; U; H7 A9 b. Q+ g( utemplate <typename T>
/ ~9 |# f$ | _class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable. ?- [0 Y' a& Z4 t; w5 P. u3 ^6 ?
{
/ N# F( y4 K) m6 D* [5 d7 |public:
* q! D1 `+ _1 ~7 N2 K% ? QFuture<T> start()" {, @6 d5 I% @ ~! @) T2 V% B' e3 ^/ s
{
0 d9 ` o, B8 z1 R; b this->setRunnable(this);
+ s' z7 D; N, K, [ {' O z this->reportStarted();
. P0 n p& Z4 ` QFuture<T> future = this->future();6 p9 V1 t8 u4 I: u# [/ O
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);- |/ a1 i2 }8 ~5 H5 k2 Q
return future;
{% c+ }' F w9 S6 B8 y }
! N! ]0 z8 e, g0 A6 u! z; H' G b3 w, V$ B" i: K8 n' T% `
void run() {}- s4 ?$ p2 l) U
virtual void runFunctor() = 0;$ n7 h- }5 f7 o
};
! V. o# ~/ M- C0 O% @) r9 a
7 l# Y3 _% C" a) ?template <typename T>8 P. s6 B, Q: o6 k$ F
class RunFunctionTask : public RunFunctionTaskBase<T>
/ L; W# Q6 J8 X) I, M{5 X; a o3 s( I2 R8 Z2 R l
public:
" M6 t( F3 i2 f* P/ k5 i0 f# ~ z void run()
8 t6 H% S$ P9 F& u {
2 d5 O1 p7 u5 a& `6 O& M1 R& `) u0 S if (this->isCanceled()) {# S& r4 p# z. W* G6 \
this->reportFinished();
) r6 s) e3 y5 D/ s. u' [. f& {: } return;" }/ Z3 K5 g5 i
}" a! `3 w0 U! `" h4 f; M; R
this->runFunctor();% d3 R) B6 I% ~
this->reportResult(result);2 N2 h7 z! O% B8 ^) K# R
this->reportFinished();7 _9 S% W! ?5 t# [
}- G" @( Q: }% A. C: M* }& G+ a
T result;3 e2 k" b- W' w0 P
};; N" w$ i1 r8 F1 N
s! u& f6 [; T# o2 o; ^7 L2 O; s
template <>& g: E" i$ K3 d3 B2 V
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
" r. C9 y" K8 ~) ^0 K4 _4 _/ j{
+ |: H- k2 m. x7 @# j7 Q; p0 epublic:) b* Q$ T4 [. g1 x
void run()0 @& h# m, @; G% i5 n# L: l) l
{
" R/ X" w' b8 x9 F; U( w) {3 P" P if (this->isCanceled()) {6 H8 n- W. L" e( W- G
this->reportFinished();8 { w" P" r/ r0 O6 w) X
return;9 w3 v i @% E6 O! n+ A. v5 n
}
+ L: h- l S! t0 F/ } this->runFunctor();2 U2 E- B6 d$ X4 W" {
this->reportFinished();% @& f) Z) n0 J$ o! |9 k% a
}9 }) b( C0 }. u# A7 c$ o$ d8 [0 J1 O
};
/ z6 L( I0 Y. \: F, |0 E1 V. c( r
} //namespace QtConcurrent
0 G B3 @3 v, J! B
6 H7 m" T+ ?0 d: O0 Y! \$ F9 o#endif //qdoc
- S# g3 e( r) K' `% n" O; ?1 q# `: e: k% Z- h( Q: v
QT_END_NAMESPACE
6 `# M! U4 m% ?! E/ S yQT_END_HEADER
, L( p! H. r6 y8 s) x) a. s0 q" i$ T3 K% }9 ^9 {/ Z
#endif // QT_NO_CONCURRENT
; [$ n% W2 ]* a
% I3 {! m7 i o0 j#endif
. q3 l9 H s7 b3 ~3 g+ Z7 y& f
) }# ], z- f4 [: K" R: s6 Y |
|