|
|
我对syslink进行交叉编译到arm,但是出现如下错误:( n/ f0 ~( J( C% E- v
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'0 l5 n0 j* p3 `; f3 x
3 ~8 e: r9 ^3 d" p' Z4 \
这个头文件内容如下:
" {( U+ V# G% N' P" `/ I1 b3 i5 h#ifndef QTCONCURRENT_RUNBASE_H( |: {) {) t$ z' F0 @9 O' R
#define QTCONCURRENT_RUNBASE_H2 k0 B5 `! B @! v' d
. Z3 ?9 x8 e: V. s$ N0 B: f [#include <QtCore/qglobal.h>
5 M, }5 G3 h) B& G. ?- g
U2 R9 J1 b& M4 H4 c#ifndef QT_NO_CONCURRENT7 j; `, \9 ^, D8 f5 _
( S% a) K3 G/ F: {) H x7 M. I$ |#include <QtCore/qfuture.h>
9 t b# [3 |" ?0 G: y#include <QtCore/qrunnable.h>
4 e- d5 K, o& M4 E! I+ s$ f& j#include <QtCore/qthreadpool.h>0 }5 Q/ m: J- a( ^8 }+ L4 a; g
2 S$ \1 A' A& N- q$ z
QT_BEGIN_HEADER0 X8 c! ~+ h5 L5 x% c) h9 B# F" Z
QT_BEGIN_NAMESPACE
# r a0 r4 q! _6 F! @, Q) J( M
8 C; x$ y5 _2 i! A1 P/ i0 FQT_MODULE(Core)
! t; u5 k. [. M3 n8 ^, `! I S# X0 \; q1 t. d; z5 W! v- r
#ifndef qdoc
, t( c& [' l7 W
4 h# u% M3 r5 D# d' Mnamespace QtConcurrent {
9 Q. c( Y7 k L4 i+ {+ u( n6 W
5 g- I% x0 g# N! X) ` u" f+ ]$ Ntemplate <typename T>& e# v0 }5 }7 W
struct SelectSpecialization7 Q8 P' l- y+ o" h% }8 F
{
: Y6 R' j! D) ^! N template <class Normal, class Void>& m. @6 D8 V4 [( U
struct Type { typedef Normal type; }; N& e7 X) I P* ?+ ?
};
/ m% B6 {5 i; f3 k& s
6 R/ g0 D o! ?2 V3 W8 e& etemplate <>
7 z7 F: Q$ M; _7 jstruct SelectSpecialization<void>
2 N( D7 c6 B% ^' S+ q{
6 c: e& }$ u2 j5 ~) o template <class Normal, class Void>* v M' m) w7 t+ _0 G
struct Type { typedef Void type; };
% X% \) W4 w2 {};- t8 e" @; K- D9 n8 L h
8 Z- V. X( K0 b, C2 w* V H, T
template <typename T>0 p/ m U; f, O3 U) w3 T
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
* l5 ^$ j! O. U# R/ W{/ U: i4 r8 g# H! N6 `3 l- F# U
public:
9 N6 N! {2 ?( u9 B8 ` QFuture<T> start()
\3 H$ y& r; H {
9 e% m% K# Z- Z1 j this->setRunnable(this);
% c& J9 u9 t M: N8 [$ |4 i this->reportStarted();
9 P, p4 `) D. z1 ~( c: ~; {* X. O QFuture<T> future = this->future();
2 i4 K& T4 @) s$ l" P QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
! c$ N0 b: a; M/ V/ Z8 ] return future;/ Y2 B* l3 v0 j: n
}
" u5 w: I' p& W, C: S0 e! x# R2 e
void run() {}4 v/ M) n$ D3 f- g) P1 F
virtual void runFunctor() = 0;
' ?9 s+ h8 B' r1 z+ K};, V5 x' w6 h* k# l9 y) b
, J$ z" s6 }0 p5 Ztemplate <typename T>
% J. l7 J$ V6 r+ |: Z- }class RunFunctionTask : public RunFunctionTaskBase<T>9 \' B, R) p% _( ?3 Y/ S
{$ D) i" n1 M( x4 a" H, U8 l
public:4 u5 q3 @1 y% b
void run()+ S: C1 H7 x4 |5 i. n
{' J* q. X: G" w: b& Y
if (this->isCanceled()) {# O* e3 T& t4 t$ b( c
this->reportFinished();
+ T% e" u( f/ ]# M# d& Z& q& \3 Y return;
% C$ i" I2 Q6 Y: T) w3 W }, s, k# y* T% j/ ?! n/ M3 c9 i6 X. c
this->runFunctor();
" B6 I7 C- b) c4 e" W5 F; e this->reportResult(result);
2 N5 J, N* ^3 o0 Q: @+ W; T' Q! k! x this->reportFinished();. r; f7 L+ J4 s
}
- [ r; Q! r3 _* I! B; r0 s T result;# f$ r3 q Y+ O! J
};* p% N+ B( ^3 I0 c5 V
5 l! E% l( Y1 G6 atemplate <>
6 x0 p. {2 A/ @6 v. cclass RunFunctionTask<void> : public RunFunctionTaskBase<void>! ?( o z, w# P' |
{
& N; y9 p; T9 {# |( t$ \4 Zpublic:+ }- {# u5 }$ A! q9 W0 ]
void run()" Y" T7 e: ^3 F! i' Z
{
+ D: E. \7 v( Y0 b) L2 [0 v if (this->isCanceled()) {
; b& M2 I- f" M2 w* s. v this->reportFinished();3 v- i; R, U. C
return;- C% Y% y" Z2 ~8 ~* ]
}/ T. x+ s7 U. _3 G9 d# G0 o8 J7 D6 f4 c
this->runFunctor();
0 a/ s9 r+ A! _0 q5 |) S! T this->reportFinished();
- o' e- w. B: B( U. n }' i: O/ Q+ U1 w0 d; Y0 V
};1 E- A# z$ A$ N
; [/ g; ^5 e/ } f( q
} //namespace QtConcurrent
* Y, [1 n, c k. h0 g
( A+ b- K3 L( ]: h#endif //qdoc
; t7 ~& H' H- K/ {7 J/ o% x* x5 r3 V" c2 J# Y) [3 ]
QT_END_NAMESPACE
. P9 L: p5 ~! F+ ~) N+ lQT_END_HEADER
O' C J" u$ [4 k- K3 I6 O8 ?4 v& \
#endif // QT_NO_CONCURRENT6 \" R/ ?' l' _! {2 V
9 A L: ~! _& j" w#endif
" l$ w$ P1 J& \, [. c7 _- \3 [% U+ b1 I0 e9 r4 E* v i
|
|