|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
9 c( m' N& Q" j/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
& ?# t3 v. h/ b, I& C" A/ K% D7 E7 V" A# d0 z6 P
这个头文件内容如下:
. b# a7 X! x& O8 d. j#ifndef QTCONCURRENT_RUNBASE_H
3 S9 Y1 q4 T% s5 T' x6 N/ A#define QTCONCURRENT_RUNBASE_H2 M7 {; [# Z) w
- ?9 o( ?& X) ]8 V& R9 s( W i/ m2 I: x
#include <QtCore/qglobal.h>
$ S p: x* \8 _! C3 w& ^4 _5 N; `8 _" C
#ifndef QT_NO_CONCURRENT) g9 V# N/ n. a1 {3 b. C1 V+ ]; G
' q/ a) w3 v: g6 h. j* b3 [4 l
#include <QtCore/qfuture.h>. R f' Q; o; r0 _
#include <QtCore/qrunnable.h>% D i8 l5 T, o3 h; E, u% G8 }
#include <QtCore/qthreadpool.h># c! W4 E# ^2 Z- x
8 f* I/ R; b( ^$ n; v9 CQT_BEGIN_HEADER( b( N& \, |/ u8 H; f$ h
QT_BEGIN_NAMESPACE+ `: S% N& j) g6 q M/ f
7 i, W; K- a; o$ U8 e Z+ Q e! [QT_MODULE(Core)
' h/ @* {" j# H' p u) J( u- ^/ q y6 g! T7 B5 T& s- o! D
#ifndef qdoc
, r4 z0 m- B6 I7 b: p1 S9 X
" _/ T \7 g% `3 p# Bnamespace QtConcurrent {' I8 e1 i2 m) {" l1 o U
% L5 l3 N$ u' }" {. d) R4 J
template <typename T># w$ h. ?; G- R, A" C) j
struct SelectSpecialization, c9 U" z' }6 z2 W% _* j6 i
{
+ k t2 E( I( i9 r template <class Normal, class Void>
, U& M! Z) ]0 | struct Type { typedef Normal type; };7 s: S- K+ ~9 L4 H1 [! `
};
, Z" D: z0 d7 }& l9 e0 r3 P8 H$ H% N5 v t/ X) w
template <>' C' S8 E! b* }0 N) H* J5 R
struct SelectSpecialization<void>
5 j& j: r6 Y: g" l& D. r# u{: `5 U) f* p8 V L
template <class Normal, class Void>
; j* X" K0 Z0 N4 x6 Z. w; Q! c struct Type { typedef Void type; };% f: }; ?) t: C) e
};
6 \( v2 _. e3 `) \$ ^, P: \
& H6 o1 P& o$ Q$ ]template <typename T>7 C9 c: w9 I8 u/ k
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable# P! e. B; ^% b- Y: e0 Z
{3 `* a& ?, @) V7 e3 M: t' w0 J
public:
+ r# w8 E# U& _9 ~0 Y$ S5 k QFuture<T> start()
5 d5 e: i1 m, [( g) X {' d# L; ]' I- E8 e, T% H% {1 P- h
this->setRunnable(this);
3 F! L2 N* e% A5 b5 S/ Z+ \0 y K this->reportStarted();; L6 p8 G- a1 Q* C
QFuture<T> future = this->future();
* q7 k1 p3 ?; i' w s3 w QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
! g( S; D/ | ] return future;
5 a' t7 ]$ K8 W+ d5 @6 q6 j }
2 l/ N0 R9 a" Q5 N. H7 |/ }& J {* i- z
void run() {}% [0 _! G% {; D" j& g% D) }
virtual void runFunctor() = 0;
* d3 ~! L1 H8 i) \* V K};
3 o1 x/ Z# {5 B/ G/ W. X( g: j O' h3 i0 s9 l" i- A% B# P( f7 l$ d8 o* s
template <typename T>% n8 }6 e; [* }
class RunFunctionTask : public RunFunctionTaskBase<T>7 }$ ]1 F8 ^# k3 i' g$ u
{9 ]: R3 j1 N7 h {
public:- _) v- t) h+ u. V( c
void run(), {9 g- X6 g; x* M/ Z
{
0 F( m* B& ^4 I* J. t! T5 ] if (this->isCanceled()) {1 U+ a9 l, Q& r6 y. \
this->reportFinished();
_, P$ [3 o& K9 A3 \8 |* N return;8 X; j# f4 u, a
}$ J. W7 N4 E, A3 \: G- Y/ h
this->runFunctor();
/ N! s9 S9 e9 I5 s; } this->reportResult(result);0 c2 Q6 K& r9 V9 k
this->reportFinished();3 x+ S, |3 [9 U- N
}, p }+ w W% o. k4 M- T$ k
T result;/ A* X- D A- [$ R+ d
};
4 [: z& h+ l' \8 R/ b1 I7 I5 w$ F8 ? q; _& F, P6 e0 R+ W+ q
template <>
: _( T( c2 `* Y) A9 h3 aclass RunFunctionTask<void> : public RunFunctionTaskBase<void># M+ l b) t3 p8 x
{
3 h8 Z _$ @! _" |- h+ c1 E. apublic:( e! S c# v3 N! E% Z
void run()
! [2 d7 V5 O7 K4 T) w E {
0 r4 E+ t* _0 Y0 _ ~ S if (this->isCanceled()) {
# n% B! P8 h$ E$ ~" f this->reportFinished();6 V2 e" P; \. }* @1 I8 L
return;
S$ \+ t+ g1 t: t7 l }
2 Z# m+ e/ U7 D% p0 f* H/ m this->runFunctor();2 d4 p9 f9 i+ E& E4 X
this->reportFinished();& n5 W; N' Q$ k
}
$ f& A9 z5 h$ r};
8 s2 l; y, U& z6 [5 e4 w0 y8 ]3 u) l# O8 w6 H
} //namespace QtConcurrent
( U* u5 r; Y2 m( z+ C4 u4 ?/ i' q* O
#endif //qdoc
: O2 D, I$ X$ ~8 `6 G' Z6 \4 @. r8 s* B8 H0 K
QT_END_NAMESPACE: B7 S& w1 e( r# h3 u% D$ l" U
QT_END_HEADER
6 {& b9 f- ]; F6 N/ j( G' Q8 s+ P4 A4 G. w/ C+ N
#endif // QT_NO_CONCURRENT& `5 V/ } ^/ ~. p5 l
; Z+ i }8 q$ m: N#endif0 ~# t3 U* k4 x# \; e3 d
0 x, |. Q) r$ d% ^* R* d
|
|