|
|
我对syslink进行交叉编译到arm,但是出现如下错误:3 y5 _' b6 Y& J* Q
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'1 O# n7 Q# M7 f3 O: N5 r' X
3 S1 g/ r2 x1 A" \9 l- Z; M# c2 ~这个头文件内容如下:3 c5 L: p/ F8 }5 o
#ifndef QTCONCURRENT_RUNBASE_H; z* p+ T4 K7 w9 _+ ?
#define QTCONCURRENT_RUNBASE_H8 ?( Y; R/ h; x" c- B1 ~2 O1 K' @
! j- b' o5 l3 m& a" J4 _#include <QtCore/qglobal.h>
9 g/ ~7 t9 j" k9 M/ C9 z; Z8 y
9 k2 f/ n. W/ @, E i+ Q7 M- { t#ifndef QT_NO_CONCURRENT
% {( X& t% Y/ ~: Z- q J! A. U+ p' }- `
#include <QtCore/qfuture.h>' N8 {7 @, @0 p, ~' o4 z9 ]
#include <QtCore/qrunnable.h>8 e& u7 u; K/ O5 ^. x2 k# o
#include <QtCore/qthreadpool.h>
, Q& x* G9 _5 j; [# U; b# m/ W( ^, g! {+ c% G- n& \; |6 M
QT_BEGIN_HEADER" D+ a/ F7 e! F m$ A2 ?7 i
QT_BEGIN_NAMESPACE
# h' \+ M' K9 i# |5 q- m! r1 F+ f" @4 x3 n
QT_MODULE(Core)
- i$ L$ f, A9 @4 ~9 v
9 U8 J. ~9 z" P& r' q/ H#ifndef qdoc
( u/ P) q/ W9 \2 v) v3 e1 }/ D$ u# Q9 i# u/ c# e+ a
namespace QtConcurrent {7 w9 P; a, P' k) `" |. F
) c% ]- Y; U5 D) Dtemplate <typename T>0 j8 ]. V! i1 {3 W% Q
struct SelectSpecialization6 ~" |$ d# l: G
{6 N2 |3 N' e) [/ I7 `% E' {
template <class Normal, class Void>! p2 {9 Z s% _0 F; {
struct Type { typedef Normal type; };" I G$ X! F* D* N, ~- b* h
};( I- H0 I0 o) K4 X _7 \5 e
+ t) D- `% i0 n% x. d! dtemplate <>
' f8 ^% y/ [/ Vstruct SelectSpecialization<void>
6 @3 y! A! b! B* |5 `{: A6 |9 A6 M; T
template <class Normal, class Void>
9 ~' U& p0 @$ n2 Z) `; m2 Y struct Type { typedef Void type; };0 W1 @; {$ H% Q; s5 J I: H) O6 e5 p+ q
};" y3 Q$ q; j% G% o; A3 j( H4 R
5 G$ Y- E! K3 Btemplate <typename T>
0 r: B1 ?% V. ^% [8 k7 p8 N1 i' [class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
1 v, f, T& H& c8 s6 L{, a9 A1 [# h8 x% e' _: ~" P/ k* _5 A
public:9 _" n& U5 J2 M! \6 U
QFuture<T> start()2 i# u- e9 N- d
{
3 o0 o! _* m3 O7 s! F1 |# o7 w0 L this->setRunnable(this);0 l0 T- D2 ]7 W/ o
this->reportStarted();5 m/ Y; D( [# m- r) W4 m& F& h
QFuture<T> future = this->future();
- l7 n0 }: f! A* t QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
: ~0 c: R- M# B/ Y1 \# y% s' `0 X return future;3 f( z+ ^% q; r) r. c: Q% L/ T
}
2 t* k. m" p* j: N2 j; K! k9 w) t! t/ f
" Q' A) H& C# P1 ? void run() {}
% T' O! O w. W- h8 j# V virtual void runFunctor() = 0; e( B8 I: O! N5 ?4 i, L
};: V; C, b; `, E$ l9 `0 j8 n
! z; b5 h/ ~2 v4 B. J$ w: X
template <typename T> P0 P1 [* [; A% `; r, m3 n' B
class RunFunctionTask : public RunFunctionTaskBase<T>
# W) h& R- p# W% h4 W! ?1 z{7 v' d3 m; Y: D
public:1 D/ V! Y/ _# x3 Z3 Y
void run()
! ^, c" }2 Y _ {! i; z g8 R4 s& B* V, ^
if (this->isCanceled()) {9 X& d. ~* ]( v1 G% R
this->reportFinished();) D; Y$ E0 Z% x; P/ k! ]1 ?
return;) `& k+ \3 {3 J
}
) e. R' R) ^1 x this->runFunctor();4 G% f! n0 j, S0 O' P1 n! `
this->reportResult(result);( ]! J+ q4 `) |* K& x- ~( u6 p
this->reportFinished();1 K/ A1 m# R7 Y: A% p4 }* k4 E
}( M6 S+ h/ g1 ~1 y, {7 p
T result;
' [' `3 c# v' ^* @};* s4 ?, P# v/ K9 w \
* m8 m/ N1 R! q @% Ytemplate <>
7 Q4 l1 p# ]7 uclass RunFunctionTask<void> : public RunFunctionTaskBase<void>+ o |) m/ B7 j: j" I% d- N
{
0 U' H4 k ]" Y/ `0 wpublic:. ~& E& Q0 q4 s2 V
void run()3 K+ P6 a: K! j! m* Z1 \
{1 |+ M+ C' a; H* w; |
if (this->isCanceled()) {
/ x7 U! S1 t/ X! F( k0 [ this->reportFinished();
0 d E6 B% n2 T+ |& @. d% \5 M return;
; a6 f. T$ l& b! R- Y Y }
; v9 A/ P3 u) {5 V" g2 y) f this->runFunctor();
* D7 H, A0 s- _* [! d this->reportFinished();3 l' V3 F+ `$ j" _) J% \- p( i3 R
}
6 ` X( h# F Q8 U% w7 \6 u" O/ I" }};- N; C& l0 a# C( b
! Y4 E6 j/ D% G- |9 ]- ^
} //namespace QtConcurrent+ X6 C$ O6 g5 \5 O
- K, Y/ m- A. {5 \8 Q
#endif //qdoc6 D# u: b) K! n0 w' p6 \8 y9 H B
1 x6 L* `( V$ n W" H) ?QT_END_NAMESPACE$ t, O4 |4 N, x4 ^
QT_END_HEADER
6 q+ p+ N8 C8 {( I u. ]' S/ c. b& L5 C3 r i
#endif // QT_NO_CONCURRENT
6 v/ o! [: r v" l% n1 {1 [3 s1 L! o# @/ {2 y' ^
#endif. O1 q* t9 |/ S9 o4 A
% T. ]& |- A! {' ]
|
|