|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
$ L& w6 O2 X. z! l! f4 A/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'7 \7 l. Z0 V; N7 R; e0 ]+ w$ a
& E5 G" A" D* P* K5 n' `5 {
这个头文件内容如下:
1 k5 J; e0 P. k3 q/ y; d. P#ifndef QTCONCURRENT_RUNBASE_H
( M D. n+ L8 R% H4 c% y& l7 [" N#define QTCONCURRENT_RUNBASE_H' {- i) ?- D" O. Q; n4 p: s
! n: I; C5 c4 m" L#include <QtCore/qglobal.h>5 [" D0 t) j/ J7 q" n4 C
* t' g9 Q( ?- I, Y#ifndef QT_NO_CONCURRENT
6 n! \) I4 _) V0 ^, o# G H7 S7 `0 x7 S7 S* m- D1 p3 K
#include <QtCore/qfuture.h>; _/ a3 l0 s( Z' n( z: R
#include <QtCore/qrunnable.h>8 m9 ^: m! h7 ^* C
#include <QtCore/qthreadpool.h>
& {3 ~. R3 w9 v* Y
, d- o2 D( }: W/ fQT_BEGIN_HEADER5 l4 F. \7 b9 t5 j; p0 h! F
QT_BEGIN_NAMESPACE
( M% C. R: F, k! f% Q2 X U+ [0 `6 g$ N V9 h7 Z
QT_MODULE(Core)& e1 J% i7 V. U( G- p2 q2 E
7 P2 l4 ]2 l! [/ y9 f) `9 {3 f$ A
#ifndef qdoc. C0 R: F# H0 E
1 i% _! c* C& G# @2 x! `2 `2 hnamespace QtConcurrent {
- ^( Q) v% ^" x8 b! Z% W
) D( Q* e0 W0 n! y ]& Ytemplate <typename T>
" a& L o0 O& v# C) A+ x6 Qstruct SelectSpecialization9 S p$ O2 V' X. W( V: J3 m1 j
{( N% i ] t5 r5 g) ~; ~5 Z1 ]
template <class Normal, class Void>
5 ]: H* w# y) O- [) C struct Type { typedef Normal type; };
. u# v' ?4 ~( ]* Z& ]};
' x( w; |0 A# w7 B& N {* D2 @, M! u6 ?! C3 I. G, l6 Y! O- v
template <>
* Q% u1 M: n/ Y2 @7 b* R0 cstruct SelectSpecialization<void>2 h/ @1 J2 b' N0 _4 X8 H
{* K- v) \+ w, p' _/ P7 O
template <class Normal, class Void>1 R* D/ }0 J: y
struct Type { typedef Void type; };5 T7 o' o" U& ] m& v' G
};# g, U( z, l$ u* q
7 Q; ~: g; m, A- e: x4 @: P4 f
template <typename T>+ X/ `( \9 n4 r- n& ?* x
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable6 Y) w; o6 P0 w2 {8 `
{! K Z3 D& o' C: B
public:# |/ [, v+ i/ F' [" M O
QFuture<T> start()
1 d9 F8 I3 ?/ v% o {- \9 p7 ?6 L# N, I. I
this->setRunnable(this);
3 T3 N; { l" b% y this->reportStarted();
. l/ |0 [1 F2 Y8 s QFuture<T> future = this->future();0 e$ V, R# P) F0 q2 Q
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);+ F8 c( h) B: s. H: y% N3 F
return future;
$ p0 G ~; l9 _. K3 J! @/ v( r }2 x) l; N p) n+ u, B
" u/ u a6 ^; ?' R) j& D void run() {}6 L7 P% L a4 J/ @
virtual void runFunctor() = 0;
$ R$ ~ E/ Y' z};
' K- u! s# I5 p* p. b* j- P) C7 ?7 _ ^& Q+ b: R
template <typename T>
- K, T- N3 x- |! e! P( }1 O0 Zclass RunFunctionTask : public RunFunctionTaskBase<T>' H7 r3 a; ]5 {
{7 f- c8 c' Q8 a1 @3 e
public:
0 q) g1 c* h7 u+ _- u% _- ]/ P. g void run()
m8 G+ s% H' h4 A {
$ d$ ]2 y# U* i" J: u if (this->isCanceled()) {
- O& P& q" v L0 \ this->reportFinished();
# e3 T% c9 l+ l1 _$ U return;
; C& ~# W" M) d8 K) S \ }
6 E$ B1 c+ e1 ?% f$ _* r this->runFunctor();
% I4 P6 r' V9 N1 \& _ this->reportResult(result);, |4 x& O* x ]- i9 ^
this->reportFinished();
( P, r8 J. K5 P- e b }
0 ]6 \7 r5 w3 { ]" [) J- Q0 C, I T result;0 S, t; F; {1 X- o& L
};; o9 ] v7 X4 s+ b+ O) V7 X5 M
1 q% @" v% D, @( |, Otemplate <>( ]9 @$ g; l: e
class RunFunctionTask<void> : public RunFunctionTaskBase<void>" R( B8 @3 ]- |
{
8 ]; O& j9 g) t& Q; spublic:3 ]% I0 v0 {6 A' I0 l! E/ s
void run()# Z, a0 ]* K' q" S! T* B
{% T5 s$ Q q. G( P+ y) w& I
if (this->isCanceled()) {
) ^ l( M* R9 J4 W( R! S this->reportFinished();
a5 u D- {2 f' o return;( g. p1 Z2 P9 d* Y
}
8 o" t0 {3 \0 `0 m this->runFunctor();3 K( |1 h' n" h
this->reportFinished();
% ?4 }, V+ _% W; m O }
6 f: f' f! R3 A0 p) m5 ~: k};: i! F2 T+ T3 u9 |
8 m) u5 C0 g/ l, m} //namespace QtConcurrent
/ t" C5 X8 }7 Y, ?) t( w; ^* ]
/ @5 t# C; _1 v5 g" Y#endif //qdoc. P/ u3 A0 G; e( e& I& t
# a. k/ I. u5 y, j( I d% x7 XQT_END_NAMESPACE- r) Q. n. M# o% W) r
QT_END_HEADER5 S& g; ^9 g( K7 U' u7 a( V
( C% l: G9 `. ?) W
#endif // QT_NO_CONCURRENT
# ]2 q7 U0 c- {. ~+ S* m
5 P( D7 \, \$ v4 R#endif/ L% J4 G/ l# _( V, }0 w9 v) N
, x8 |. N! v1 A8 {6 g
|
|