|
|
我对syslink进行交叉编译到arm,但是出现如下错误:, ^, m7 Q! f, t0 r& f2 M
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
! {% d! @/ P& `$ H) f/ ]. _& n2 K1 B5 K; h+ `6 Y1 h$ N
这个头文件内容如下:& c+ [" Y3 W u# p6 i# l
#ifndef QTCONCURRENT_RUNBASE_H
9 q3 `% l9 N/ o" _#define QTCONCURRENT_RUNBASE_H% U5 ~ `, {. t7 h
( y2 G/ s$ S1 B2 U( U: b# `: R#include <QtCore/qglobal.h>
5 b* H: z' O' Q0 X* |2 f) R2 r% D5 l2 g4 K/ A U
#ifndef QT_NO_CONCURRENT
% H9 ~7 F9 n3 Q2 b5 y |, M2 }3 p$ _
#include <QtCore/qfuture.h>9 w" s% e( _# V: T" b
#include <QtCore/qrunnable.h>$ H% V+ @6 S. k6 ^; o
#include <QtCore/qthreadpool.h>
G- m& x) d1 e. K" {9 m
6 Q' _" j! W: E& P% y7 a* `QT_BEGIN_HEADER1 Z9 S1 c2 y& m) n, y2 Q8 a4 y" a
QT_BEGIN_NAMESPACE
, }- ~* ]4 P; P3 l. R" G- p7 }% D2 Q1 B( Q" y
QT_MODULE(Core)
- R+ S; q& ?; I) F* w2 F( ]" U( e2 {4 w/ U6 R" F+ P
#ifndef qdoc& j- Y& x: V: h. I$ I
+ @6 O) ~/ D6 [namespace QtConcurrent {; t) u, S: x- J
. o9 L5 D1 J) Y3 E
template <typename T>! p2 n4 e5 q( s& O/ T
struct SelectSpecialization
/ j1 X( x/ n3 X{2 d" d6 I* ?6 _
template <class Normal, class Void>
4 ]" s" A" E# r8 \5 C4 N& F struct Type { typedef Normal type; };
& r, c* z: A3 H; z4 q3 X};
# q% o; o! v0 U l" x# }4 W
3 q$ U' ?( a. C# W, W4 j# N3 S1 t1 Jtemplate <>" p8 T8 C3 z( @1 h
struct SelectSpecialization<void>
3 t0 w6 h# I' K+ j6 i, |* }( _6 V{5 S6 @% @5 B$ @: P/ ]: e/ z. Z9 C
template <class Normal, class Void>/ ]) y' l$ y& n3 U$ W% L
struct Type { typedef Void type; };8 w- q: f: s$ M- `% u
};
$ m, H y) J" ~0 } ^2 X5 u. U8 K2 L2 F; [$ ~
template <typename T>
) e+ g& a& Y8 f$ Rclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
' H7 O: A) V7 d2 R1 i{1 D& w1 r, K$ `% a% n, G1 s
public:
+ f, c# L! ?% |( [8 W4 S) @ QFuture<T> start()2 ]+ Q* H0 m/ j. P
{
2 a R) r5 u- U: h% ^+ Z4 I4 t this->setRunnable(this);, q/ I) Z4 D2 ]+ e) t+ X) X
this->reportStarted();
0 P6 N& t* m0 v; h$ @ QFuture<T> future = this->future();
( r" c2 k; v' i7 _6 w# z QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);4 N5 s% I, s9 P+ W
return future;2 M5 |2 q2 c6 ~2 H( w# {6 B
}
6 x' ?2 L3 O: G) Y" b8 ?. Y" c. M
void run() {}; C! \; T% [$ i- \% U
virtual void runFunctor() = 0;
% \+ l; [8 Y# g! U! r0 z};, r$ e1 w/ C) p& R( C8 @9 s
, q) l A1 p2 x, e K: j
template <typename T>
! ]* R& t+ M% r i# Eclass RunFunctionTask : public RunFunctionTaskBase<T>
; l( y- P% W0 n' Y6 i{- e! |+ O# A" w% N+ Q
public:
! {( ]1 @! Y0 ?9 v; d n void run()
6 B G, n; a3 n' |$ T' u5 _ {* n0 u2 B% X$ Y* u9 p* _
if (this->isCanceled()) {$ N9 p6 N* J1 h) E8 s) D( [' n
this->reportFinished();
: i4 N6 P5 G6 i return;
4 X! C% `0 ?4 J: ?1 C9 }( W) j5 I+ j }) k T: \1 c. L! A3 ?
this->runFunctor();
4 F2 q9 m5 K/ w8 w9 k. b! x% [ this->reportResult(result);) u$ l, a2 ^1 B% {" K
this->reportFinished();; r2 x6 r8 x( A( L' ]" ^
}
. m8 R1 G1 N7 a6 j3 l' M+ } T result;
2 e7 @, e5 r3 y; a# A4 i};
9 V q3 n2 u# u" L- e/ O1 B
! H% R4 ^) j1 `* Ktemplate <>+ r T) x& A& H' c& f' {
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
" p: u8 T1 q+ Y* @! r{# h8 _8 f. P( q# E- g
public:
7 W2 g7 ]+ X, w% V$ g9 w void run()
" J) @6 d$ P; L R4 Z3 G {5 z, X* K! V8 t/ l4 `$ M. x
if (this->isCanceled()) {
% E9 S3 S& U; m4 V this->reportFinished();
& Z6 f1 B/ K# Q: ^7 q1 r return;( K( e7 c, t: F
}
. @% l" Y0 }9 j9 B( g this->runFunctor();0 Z6 j) S( V% W8 A2 S. e8 U
this->reportFinished();
# F# O" v& Z2 D! f }) T1 \+ D; {- ?6 N9 r& \+ k
};
, U' a5 v4 m3 Y4 C' C* P: g) K
$ h1 Q/ ^1 s+ V4 L) `5 l2 {} //namespace QtConcurrent6 G0 T2 Z$ f' h
/ e% z! H" L5 U% u- ]1 m( }#endif //qdoc
$ f0 b, H. k# r. P! `! X4 f7 |2 B2 @0 ^. V0 M4 }( K& e) `
QT_END_NAMESPACE
1 _" C9 U$ N# {7 jQT_END_HEADER8 g( A* j- w( u5 i m
9 b C" c2 G- v/ M' G7 D! x#endif // QT_NO_CONCURRENT8 \3 D$ ~4 v" u1 \/ Y) E0 q
p" Q" n8 i7 R1 [
#endif
) |: P! U1 J' ?) D7 _; B
' Z+ j/ j' p. {" w8 d& m |
|