|
|
我对syslink进行交叉编译到arm,但是出现如下错误:' P8 Q0 ^" D+ L; `" \$ P" K# d8 G" w
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'$ ^9 u6 ]( ?; S- X( D6 A& Q0 Q
) B) J( w) a/ p" ~$ k这个头文件内容如下:- S# G. B* f0 ]
#ifndef QTCONCURRENT_RUNBASE_H1 m$ ^2 K0 q/ \' j
#define QTCONCURRENT_RUNBASE_H
* _# c7 v9 z% e6 k; ?2 b9 ^; z& \2 f
#include <QtCore/qglobal.h>+ x# [6 s( }; P6 U" a
9 T& S# A; A' z" k% n% P#ifndef QT_NO_CONCURRENT
. J q& B4 ]; D7 ^0 ^/ l; f. [" o% P7 w9 [
#include <QtCore/qfuture.h>/ r: `* X9 Q2 x5 Y m9 J7 w
#include <QtCore/qrunnable.h>6 m! s7 q3 w. X" l7 [' k3 K# J
#include <QtCore/qthreadpool.h>
) r: e) }* `" E# t) b) H. J# @5 F
0 p+ s9 C# `# b6 }, IQT_BEGIN_HEADER) @$ Y# l( I, X
QT_BEGIN_NAMESPACE
) x* P# O7 ?+ y1 n |9 m
$ c: O* }$ v/ D. v4 aQT_MODULE(Core)! X* ?6 ?1 ]- Q
8 h+ ~, u& R$ [0 U#ifndef qdoc: G' t: L) b4 _+ P/ R/ ]
, e) k: ^) ]% Nnamespace QtConcurrent {
* q0 S f& k! i+ a" D
3 }# v' T0 g% X- O7 }% mtemplate <typename T>2 x0 }/ |3 | G. K$ g8 ?
struct SelectSpecialization. \5 S' h& @ l& d) J
{6 L5 O, O; y A8 i
template <class Normal, class Void>
& S9 W) a C* q, l struct Type { typedef Normal type; };. S8 o7 F4 B/ d
};; r1 X: n8 N+ }- I) `$ c- P
R5 p) g0 { ^. L! {; ctemplate <>
) X4 v' s: J. }) ?! P1 astruct SelectSpecialization<void>
9 w T a* y l0 Z' ^$ W9 U{" `3 \ `9 K! ~; z% d5 j4 e
template <class Normal, class Void>
! _( B6 \6 V ^: q/ q& c struct Type { typedef Void type; };
, q8 g8 T# R( j' n0 {2 p0 L1 m};0 G0 B' }$ t% D% y
. ^# w* I8 N% X+ T$ ^. F
template <typename T>* z- w1 l: m0 E$ V- ~# o$ ~
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
8 F1 s% {( n3 V- W{: k4 e- [- i- K7 v3 _8 q' v" J
public:& g/ g/ ?* ^- k
QFuture<T> start()
3 k2 |! r \: w1 E) Z) g- P$ S$ ? {$ h2 Z' d9 f7 \. Q+ m2 V" V8 H% h
this->setRunnable(this);7 U/ B7 A4 P, l. F( z
this->reportStarted();2 D2 H9 ]) V& L z9 Q! \4 x
QFuture<T> future = this->future();& |* R5 ~9 {" ]! V- P+ m
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);8 S! r X& X9 s! e
return future;& l6 Q: s0 R% H6 H3 A+ t
}( s1 M7 L) z5 W$ i( w
2 Q4 p: w% v* ]+ K1 V( j3 p, V void run() {}
( E6 ~3 T: g; _! g7 o7 v! i virtual void runFunctor() = 0;( J5 ?: K9 r R0 z3 f- i
};
6 w0 j" F! }+ R# }' a
( a, o- |- `4 x9 y1 O: \template <typename T>
3 E, _2 i2 Y4 _8 \& O( x! ^class RunFunctionTask : public RunFunctionTaskBase<T>, N5 W' g, m! S( |2 D F
{# f. ?& N3 B& m
public:% ?, p+ P/ [1 _' D2 s$ [; o1 O
void run()* x Q' f# h+ m+ Q. H
{
$ x% ~0 [. t0 ]5 d' b y' N if (this->isCanceled()) {
$ h n+ j3 e \7 {( L this->reportFinished();
3 v T6 l( m$ f w6 o! p return;" j" U7 f( N' Q
}
* `4 b/ K4 R0 H7 o this->runFunctor();. W9 I: P( v" c5 b
this->reportResult(result);% ^: n" j2 [* W! q; E! C
this->reportFinished();, i$ B9 E, K" x- h, @
}! o, d& h6 r- k5 o" d' n
T result;
' ]4 k7 P+ F- u9 \" n/ e; n; Y};" ?8 K1 s c. d, }
$ _3 A. b5 M) |$ ]% vtemplate <>8 W8 Y4 `; ]+ m g9 b. r
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
4 ?3 y2 x% w9 e+ J% ]& |{
, \& x1 E- h* n0 Kpublic:
7 }4 G( p0 i1 Y! F void run()
6 P# c1 k! t' V1 j# Q7 H! c6 V1 Z& n {. ]! v* C6 ~+ g
if (this->isCanceled()) {
' z; P' @9 d8 \' M# j( g this->reportFinished();
: F6 u z. `, \8 d( E return;- K8 D( y) Z% s' D1 j! I( [
}# d4 W+ K, k m0 j' U$ W+ l
this->runFunctor();7 ~2 ^# t0 i% w: b
this->reportFinished();
0 c1 J8 Q+ G. }( O2 u( {0 t }
+ K! K3 m% D6 s/ Y$ o! i. _};
; W/ G u* h- V1 p9 F0 y6 X) p8 n+ Q J! d
} //namespace QtConcurrent, e& |) x) l3 t3 g# N+ m
& C" U- g8 B7 Y) J- u2 {5 X( r; {
#endif //qdoc! \3 d7 a+ U3 `! ` g5 T
, Q, P: H) h d1 R& `QT_END_NAMESPACE) {2 M" H% t+ w* z" \: ?2 F
QT_END_HEADER0 S; e' i. d J
: ?) \7 R2 _8 {2 K. Y1 T#endif // QT_NO_CONCURRENT# V' @, H2 h! H2 M. T" g/ v
; T9 W' w& A( q: C1 w#endif
4 V& L4 x( A; F9 k( P
& J9 ?! c/ P: W& L |
|