|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
/ A, F7 @8 y) p. n6 l# {/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
3 ]/ L# L5 @; Z2 y5 N, L/ m7 e0 c x- L+ {. c+ o5 P
这个头文件内容如下:( C- Y& x1 Z' Y9 L4 x
#ifndef QTCONCURRENT_RUNBASE_H
0 y0 p- R; m/ V2 I2 b, M! ]#define QTCONCURRENT_RUNBASE_H
8 p: `' } [8 Q+ K6 ]' v, U7 X5 P$ ^) \& E( |0 r. r
#include <QtCore/qglobal.h>9 r5 s- i, p) T8 o
: _8 i3 x- C( ?# J
#ifndef QT_NO_CONCURRENT
" z, m; g# C9 F" I7 K5 J9 R$ q, P
H s7 {! O# z. J0 x- z( D) c#include <QtCore/qfuture.h>' \. y9 D* `1 G) }$ S& Q# B, g7 r
#include <QtCore/qrunnable.h>. F) V, _8 i- g5 b6 w# L
#include <QtCore/qthreadpool.h>0 y$ u9 b) r5 q, }$ u* r
% b5 W! K4 l% v2 [% WQT_BEGIN_HEADER
+ P0 H9 t. r6 FQT_BEGIN_NAMESPACE' x2 H+ E" |# H- L# V( `
( X. {9 Z" {3 }1 {5 P5 r2 _QT_MODULE(Core)
, V5 p2 i3 k* r' h: i- J5 P9 U0 g! Z, Z
#ifndef qdoc% U4 v2 y0 T/ @% L9 l$ U" C% e# v
* \8 ^2 W6 C( nnamespace QtConcurrent {
b) U- B9 N: `1 Z. g
/ g& e! @% q" j, j' J1 t- Ktemplate <typename T>- ` v9 N3 Q1 M( A$ C
struct SelectSpecialization. S* E, @8 _4 n* W0 j# F. f8 L& \
{$ F6 S9 d+ V. l% e: I+ {1 @/ C
template <class Normal, class Void>
[0 M# d; A1 `; M6 a; { struct Type { typedef Normal type; };
$ R9 Y. A( e- a5 U};# Q( M* D3 z4 W" h5 H$ p. @
7 O3 b* R0 ^7 Q/ [' w4 X$ dtemplate <>
" i9 S/ A3 B7 Q, h* Jstruct SelectSpecialization<void>
E! m7 b& X2 w+ C{
+ x. n6 R7 K8 Q1 e) g1 z [, U template <class Normal, class Void>! ] H4 Q, z/ v. c* o% v
struct Type { typedef Void type; };
& y h$ t: B: J% z7 B& [};
! P4 ^6 l2 K$ r
# D! O- c# u9 @) g% _& @" M, ptemplate <typename T>
& u/ i+ m( n3 |- v) ~1 v( B3 \$ {" |4 Cclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
7 y2 d- x. V/ w* U% U{
: _% b7 s( o2 D- Bpublic:
8 ]; f$ `; r+ s4 ^4 Y QFuture<T> start()$ M& g. z/ Z. V6 C
{ q3 e3 @0 u1 n& |0 s* u- u/ g
this->setRunnable(this);
) C. {, T- M- U0 c this->reportStarted();* d+ W0 W! E% t$ `% n* |+ v3 o/ D
QFuture<T> future = this->future();5 L5 x' E& ]; A! }6 h% w
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);) O2 O+ V+ o0 \* l# @# c! L$ A
return future;
& A% V5 l4 \% y }
$ l ?4 f& p3 B5 c, X1 p* t, M
8 o# \& u8 b2 M void run() {}- _: S" L* M2 l$ g& \
virtual void runFunctor() = 0;- ~4 F. i0 u7 l0 Y0 s
};
. |/ G: b' G8 ?+ ^% D) Q. N
" O( ~, C, e( H3 m& A+ k- @6 Rtemplate <typename T>7 p/ F6 U* y+ H b/ A$ Y* m
class RunFunctionTask : public RunFunctionTaskBase<T>
+ ]" J0 V9 u% G j{' |- {8 l' C* M! `& g; X) B% ~( W- o
public:( M: L1 H! z; ^5 s! J, G$ R0 ^
void run()5 l; M( `, J" @, Y
{
U3 m8 ^7 P' a3 j4 G% o; c if (this->isCanceled()) {9 ~- b3 k7 }, p- A6 A0 U0 \7 G9 l
this->reportFinished();2 v& G- Z4 Z9 A% b* o0 Y' u
return;, w& ^" @7 U& h; N3 ]
}4 D4 l/ s8 P3 S8 [6 b
this->runFunctor();) [# w( y4 d& x
this->reportResult(result);) E. q# D" O' R3 D' x; {) @
this->reportFinished();) l* [! V& v( I% D1 i8 L
} h8 T- u$ [' t" a7 g# \& O
T result;" A8 c* Z* {8 S6 {# ]
};9 ~+ r) p3 G! I; D2 V0 G, A
* V4 Z O( m# a8 e' L4 E6 A
template <>1 A7 G+ I- k8 K: ]
class RunFunctionTask<void> : public RunFunctionTaskBase<void>- O/ K3 `/ _# X" D: s! H6 n' u
{: q, Q$ f) @& V4 ?
public:, B- p0 [( }% g6 w& b
void run()& _$ `4 U( G8 q
{
1 A$ ?( q% F6 K2 Z& e if (this->isCanceled()) {
$ U' @1 p, w" G' k this->reportFinished(); J0 J. g0 w/ A7 Q# w& S( o
return;
; B4 B- L( I* z/ d" c9 S6 l6 R }
& L) o1 p8 t( c6 f this->runFunctor();- v& B7 D8 ?7 Q
this->reportFinished();& H# N0 g$ l, H6 w9 a. P" ~& g
}
) u9 P0 `' ^1 t) p# u}; n' `3 _8 t- H0 O5 T5 C' F7 y7 @
# _8 ]8 \, B E; h" P! a
} //namespace QtConcurrent6 C s2 ]- n1 w/ }; y
- r9 m, T, }( N: _
#endif //qdoc$ n4 o$ w/ N8 d8 v' C: \! a
9 I4 ?+ h4 B% @9 B
QT_END_NAMESPACE
9 \' a% R$ O0 Z/ ]% D5 |( \ n& H- AQT_END_HEADER2 `+ _4 E! U/ A: E, f; J2 f+ G
2 U) H) m3 X) E3 U- o# i9 k7 A7 L#endif // QT_NO_CONCURRENT$ y6 p: J1 c% n* q# |; V
* G: b: t O2 E. |5 ~/ Y! i/ m#endif/ U$ W5 R$ m2 O+ o
3 U/ r2 L6 e2 x/ h9 L; j |
|