|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
6 D; {2 m7 O V4 Q6 {) d/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 P8 J! q( y7 ^$ l4 P
1 S3 n' e, Z6 w这个头文件内容如下:
/ e4 n+ Y3 v' o e#ifndef QTCONCURRENT_RUNBASE_H1 g: w5 e& E" t6 `3 A. O
#define QTCONCURRENT_RUNBASE_H- k3 D; k4 E* Y9 @ U
- I: @, K, N" n3 b- [ f
#include <QtCore/qglobal.h>5 Y5 [ a( D0 s' N1 e% U
5 k8 W- u* P" k0 H u: B N: e
#ifndef QT_NO_CONCURRENT$ y' \* y) X1 N6 b% l
8 C% Z/ E2 O6 V$ R3 o( p
#include <QtCore/qfuture.h>1 i( m* n- L. U
#include <QtCore/qrunnable.h>1 q/ V9 Z5 e5 I2 `' l+ r
#include <QtCore/qthreadpool.h># e$ Y9 O8 K8 Q+ E
" M+ K9 B7 J4 f( n9 u0 ?
QT_BEGIN_HEADER/ @( a4 ]. |" M/ i! ?
QT_BEGIN_NAMESPACE( g8 p, B% f* A! j0 \& [1 E
- Y4 J, h3 ?) _ y& \4 R+ l, wQT_MODULE(Core)9 I+ G; k5 v. a4 j5 l
, f; f7 h3 R2 ^. P$ t$ x1 g#ifndef qdoc
* a) U# A0 r+ p4 b/ y
5 P! l0 C4 u9 d* b7 |3 tnamespace QtConcurrent {7 r7 w3 f* t6 E, |6 a
7 X$ [3 i9 ]' L! r
template <typename T>
% C, o+ F6 ]; h6 u% G: y: x5 hstruct SelectSpecialization
$ D3 G" P# `" {2 v& i{
2 f) ~2 Z, [ B) [ template <class Normal, class Void>
! H7 |* K. q8 j' Y8 [3 [ struct Type { typedef Normal type; };
2 P |) Y0 e) J: f7 K# j B0 [};
: F2 V( \& P, |2 a% q" D
6 h9 C8 ^+ _# q* S% @template <> N/ P1 Q, H, h4 e8 T J
struct SelectSpecialization<void>$ z* F$ T* w6 k T6 ]3 W% B) V
{
$ e$ e& j# n0 L5 B( X% V0 j- b/ K' E) c template <class Normal, class Void> I& C( @" \/ ?
struct Type { typedef Void type; };* K/ f' H: ^( Z1 U8 o, `2 N
};
' w% R& j' L! @! G3 b- x0 B; }1 A0 H
template <typename T>+ t( v. Z. j' e/ {* P
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
* q7 I1 F. u3 e8 w" Y; Z; x7 `" J0 Y% Z{6 s, H6 R- I1 B# ?. _) ?5 ~; G
public:
+ H* }' T% j- `0 i QFuture<T> start()
0 k0 ?5 V2 k z5 X0 P2 Z: j {
1 {3 z: g2 p% s0 n6 @- {- G this->setRunnable(this);7 z& M4 t K0 }
this->reportStarted();
7 Q( \/ ~7 D5 f5 u; z QFuture<T> future = this->future();* t6 @$ Z( b* z8 Y# x
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);3 w Y1 g; Z0 b* J+ V
return future;) X$ v+ k3 |, q* k( a# z
}5 s4 t# q! ?; G) s
/ x d6 N0 }& F E' y7 J
void run() {}
6 p, J) q" V. D* V) b) G' L, T virtual void runFunctor() = 0;9 k- j/ c2 f9 h
};
4 S2 q& T* @( z1 r- ~
& V9 I* X1 [6 K/ ctemplate <typename T>
. y8 L, Q8 H% J, I: kclass RunFunctionTask : public RunFunctionTaskBase<T>
6 h& x! p9 V# Q* X$ d8 R{
% X5 Y% ~) D( a3 Z- Gpublic:7 I1 B6 |" O) M3 M1 E
void run()/ x' H) K4 s$ T
{
5 }8 t# g4 S0 A5 e+ P; T0 ]+ r if (this->isCanceled()) {' w% C% A9 H9 I, i# m) z9 K
this->reportFinished();
+ i- @* J) d) Z. d0 n return;9 I0 H/ v1 ?, F7 g
}1 b0 o+ y! |5 k; }# ^3 O- y7 _; Z O. r ?
this->runFunctor();
2 w. ]" A& y& W% w: I* n this->reportResult(result);
) ]" w. @' L V" N this->reportFinished();
" X3 U: X* R0 j$ a% L- W+ A }
6 O" n, e2 {. ` T result;
: c2 u5 x. W" V* H o};
: U _0 ^. q E6 M" ]) }) ?
. `, k0 W9 e2 A9 X" y* Q! X5 h0 D& rtemplate <>
8 B( q" \: Y' kclass RunFunctionTask<void> : public RunFunctionTaskBase<void>/ A$ x2 q! A' A4 a/ L& Q
{# c# ]% y C( h, c+ O, \" L
public:. y, L: m7 z# ~; }8 }0 c' ?9 }
void run()6 f4 g. }% J" }; V6 ]
{/ Z5 ~. |4 W3 L# ~( y+ @# c
if (this->isCanceled()) {
7 j5 Y( }% O6 d# |& M( t this->reportFinished();
! _6 Z. D3 ?0 N return;
6 f( D" c R7 m& N/ V5 d) x9 g }
% J* ~6 q, x2 ]3 {6 _4 l5 e' ` this->runFunctor();
* T, _; i# k1 w4 r this->reportFinished();
1 g6 w% `# n$ s }
; t1 s- z1 }3 a& {};
& H6 S' f( A, R5 L' u
. H/ P* \3 F t6 P% Z, @7 ~5 T} //namespace QtConcurrent
) P8 f. l6 O- v; Z' `4 h. e8 k; X5 v9 n ~
#endif //qdoc
+ B9 ]% {* j7 f7 e% s* l. j7 u! s* D8 a9 ]. W
QT_END_NAMESPACE
; s- P- P1 E5 w2 O' y9 hQT_END_HEADER
0 t/ n3 }& |. D- H1 P |% N* i1 C1 R7 N9 u: |
#endif // QT_NO_CONCURRENT! y. K" c; A; \' r
5 ~& }% T# Y( z1 C% l
#endif
; c0 S% \2 |; X% U0 Q9 t% d* L
0 B+ @' z* |% g: Z" ~& i& d |
|