|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
% S" u( e$ H1 H; B/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 E) J3 X( b; \& X% B9 R# Z8 w2 ?1 i* y, `. m. a
这个头文件内容如下:; N& g/ c. s- `4 p, U) @
#ifndef QTCONCURRENT_RUNBASE_H
C$ s( i- I% W# T$ ?# o8 I# {#define QTCONCURRENT_RUNBASE_H) q5 {- Y) n) G$ U2 Y
( e6 l q# ^/ d- P#include <QtCore/qglobal.h>
% N# g" @) N4 c# p
: N+ |% X4 Q% S#ifndef QT_NO_CONCURRENT
0 k3 [7 ]( W y; C
$ }- M# y6 F2 L9 }, j' X$ ^: B#include <QtCore/qfuture.h>
9 f0 \+ a! Z3 A2 h' w' c+ _#include <QtCore/qrunnable.h>
1 m% h, v, ^/ {#include <QtCore/qthreadpool.h>
; a8 V3 ?# f) E! S# y9 O" I" j3 p ?1 K- q) K. S
QT_BEGIN_HEADER
l( R0 {& Z' ?" ^% HQT_BEGIN_NAMESPACE* W% j8 I* B$ ^) u r( A2 [. z+ i
( g/ t& s$ I, J+ J+ I3 @8 LQT_MODULE(Core)6 S/ h5 r! H( L+ T* j" k) x
L. V5 i# ~3 J#ifndef qdoc" E! l0 ]) O5 d7 b
. o2 r- R I& f2 U# m o
namespace QtConcurrent {+ W# g# O6 Q0 K3 C) m/ s
2 u. C2 D G" M8 i
template <typename T>
6 k: S; [; S( x. J$ wstruct SelectSpecialization
/ I5 ?6 a5 M( O Z# _0 E" @{
7 G) o7 T5 I# D5 R8 d, S0 y template <class Normal, class Void>' a; d2 m8 I c! w3 ?
struct Type { typedef Normal type; };% z7 V& f( T& ?2 `7 D
};" W5 N7 b; q9 O- k/ d h% C1 k5 z# @
: F A3 j8 N2 W; n! H0 X
template <>
) B4 W% p0 d9 c, m7 _9 i Wstruct SelectSpecialization<void>& P7 |( f3 R2 D; }
{
+ |# a! z7 l; `- `3 _( u7 W template <class Normal, class Void>
/ E! u0 j' e6 L) ]4 I. ?# F7 J struct Type { typedef Void type; };5 q: i5 E- Q: H1 n
};1 l8 H- h: x( |1 G! _+ G5 A
4 ?3 f, B# U; U
template <typename T>9 \7 R$ }+ ~7 A) u, _+ w/ D
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
3 _( H+ m5 w! q% o{
0 S% P: |# l; F2 _# Z1 V3 `public:6 W8 b5 F; o3 W3 {$ c {8 X: ?
QFuture<T> start()
! q2 I* m- H3 g/ Z4 N6 \1 k {/ j& ~ O5 ]) x% \
this->setRunnable(this);; h- q2 } j$ h
this->reportStarted();( L( J" w" T; f Q2 u; E* U
QFuture<T> future = this->future();) [- }! H( K* k( U8 f/ S
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
( A" S0 c& m, D4 Z9 q$ v S6 ^ return future;
" I4 a, f6 `% G1 ~! z2 E% \! R }
5 g& k% S$ P' Q
; b. w0 A7 A; C void run() {}# G) ~; A1 m3 ?# I7 D m
virtual void runFunctor() = 0;
% I. u+ }/ }- G0 k};
Z$ j' {; }4 \, ]* f+ G# R7 C- |
0 u& ]) b n8 D+ ]0 ztemplate <typename T>
) q6 g- c" H/ @* J. E) iclass RunFunctionTask : public RunFunctionTaskBase<T>
; U5 P v- s$ j* n1 L{0 b A, f- b! F, i- ]
public:, g9 m7 O) S$ W9 ^: B3 ?5 m
void run()
8 V/ g3 ~/ N& t2 a/ i y- f( c4 u6 ` {0 a% V2 J5 p A) T' p i: U; d
if (this->isCanceled()) {
9 R/ c# e" k2 [3 W& G2 U6 D4 h3 U this->reportFinished();
; n0 x% n7 S0 r" I2 y- Q return;
$ s! }- t: `5 j" ^4 u& w9 U: v }
5 O/ u S+ P8 D: r! I3 p( D$ {3 | this->runFunctor();" x. [0 v) M9 y5 T9 O
this->reportResult(result);
$ B" Y+ U+ \' C this->reportFinished();) }9 T- E) N3 s- ~9 f$ z, {- C
}! ]; ?$ d/ ~ C. k' C
T result;3 g4 N# I6 F- i+ f: l- L
}; i8 t; f/ d0 X6 F. m8 r% \
# ^* j1 ^& R& O' ?6 `; J5 Rtemplate <>
' z) W* K7 b8 k# j3 uclass RunFunctionTask<void> : public RunFunctionTaskBase<void>
5 X2 G5 Q: G# s F+ f' F; p8 P{, Z e. K6 z) E; M! G
public:
5 I- i! |! ^9 S4 g/ b void run()
( m( A w& ~( l; L7 W6 x! h6 n: y+ s {
8 V5 g) c O) y% ^! E2 l! M if (this->isCanceled()) {7 P0 |6 r* d P1 T
this->reportFinished();+ Q+ f' W) b/ F: [( N
return;; I- M. Y# G. {! U {' c5 n- \3 k
}
3 ~" F& o2 N5 x+ {4 N: L4 ^0 |& y# r this->runFunctor();
0 E- p, i" B0 N3 t this->reportFinished(); R5 F7 }3 O6 {6 c0 h
}8 I) t6 g7 @+ ]: ^" a# d, Y0 E8 X
};
6 J# U9 G7 I7 h( c- r9 T# M" p, Q6 ^% a( l1 J& _
} //namespace QtConcurrent0 i, C! n1 I o3 u; L
b3 Q% w) T% ]#endif //qdoc8 c8 I* K4 H7 M2 U
+ c6 Q8 J3 W1 n: W* r- [5 e' e! EQT_END_NAMESPACE
0 |3 t, G9 A. f2 _: g- l5 u, oQT_END_HEADER
* G' k, N. X* l5 N1 J R9 D
2 n. h" c% y3 p1 t. h0 h) g' L& R) [#endif // QT_NO_CONCURRENT. v+ |0 {( |3 D' Q, P+ R
* ~7 V; M# L( V8 _4 K* j#endif8 v7 c9 P t; o/ c
% x5 Q: }" O( z( f" t% H* W2 S |
|