|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
* R! w: D" C5 U2 m( }! X2 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'
s4 D$ i/ Z% M8 @: @6 N4 e: A. z9 N* v% i6 B1 M3 P
这个头文件内容如下:3 {* l9 y+ L( R+ d3 Y* E$ i
#ifndef QTCONCURRENT_RUNBASE_H
* S; D/ c9 f0 u#define QTCONCURRENT_RUNBASE_H
! `+ C$ A3 C# j$ w8 S, {
1 u" O3 v+ p3 q8 S1 @#include <QtCore/qglobal.h>
1 i: f( z3 \# u8 M7 `
6 r+ L# z1 @9 g$ l. P. N1 ^#ifndef QT_NO_CONCURRENT
7 [5 ^& o. [& h* E* c) J& q
/ @7 ^4 K; y, y2 m8 {#include <QtCore/qfuture.h>
2 S3 R8 Y$ i) R. ?& c% y#include <QtCore/qrunnable.h>
2 `+ {8 r5 U3 G5 }. s z: A#include <QtCore/qthreadpool.h>
' e9 x: p& f9 l: O' \
- o+ j1 i1 q+ e$ ]% e8 ]QT_BEGIN_HEADER3 l! \ P. v- I% w2 s
QT_BEGIN_NAMESPACE. R- H7 `" K1 Z2 C6 G9 R4 l
/ O+ O4 o+ V# g; r" dQT_MODULE(Core)9 M2 |# v/ _8 q$ C+ _4 S) \
& ?, s8 I Y" Q, P6 _
#ifndef qdoc
7 T& ~8 v g8 ?( ^/ A! H! j- C! d, A! S2 ?1 ]
namespace QtConcurrent {
/ d% @% F: h7 r
. b$ H) F5 v9 f4 ~% l# [ G0 z8 Ftemplate <typename T>1 v1 P: \+ N$ M! t+ r/ S
struct SelectSpecialization# X2 Q' R! G6 _' F. c
{
8 N t% S3 C) _6 B+ L# y7 x7 R template <class Normal, class Void>1 R4 V8 H- [: t8 F e7 j
struct Type { typedef Normal type; };9 r$ a d; B1 \- }9 x! x2 \
};; G- L6 y, \1 e8 y! ]% i
3 m0 l" D, E# P* ]
template <>
9 q, h: _" z) o( V( L& Astruct SelectSpecialization<void>
9 C- z! H, l* M; d4 n{
5 j. Q4 {- P1 ^' k5 x template <class Normal, class Void>
/ W+ m" h8 S) Z: ^% S struct Type { typedef Void type; };8 m- [6 y, x9 {/ K W
};" Y W7 \4 l; l4 O
& u; d3 z$ v# ?$ r- a) x: qtemplate <typename T>3 x/ E g- _' ]0 Z$ \3 i! C
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
; B$ s% g4 w: D+ V{
3 y* h( k( y8 p( _: f) Q6 zpublic:
9 K9 _6 N% G) d- Z QFuture<T> start(), }+ @5 m0 L) J, Y) s0 v
{
9 F; _& F. ~, }# ?) v this->setRunnable(this);' D% h5 X" Z2 m( n( w
this->reportStarted();: z+ X' f0 V# D4 m N! Y+ w! J
QFuture<T> future = this->future();
/ t0 |, a: @4 i: C5 {2 g QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);! p3 m! T7 u' y- L* t; X; F
return future;6 A1 ?7 l9 b6 G* ]; o+ W
}* m4 P' R, h) e- I
9 Q$ m5 P( G1 u( ~! \- f void run() {}
5 d' H. s3 j. Q$ u virtual void runFunctor() = 0;" e; F+ W' ]9 `+ u# S
};" J- J, R1 i% r# R# g! o: E8 ?
2 ]6 l# a! U4 U8 K3 j
template <typename T>
% s* Q' @( n1 J/ Tclass RunFunctionTask : public RunFunctionTaskBase<T> o. m" ]! P* S/ l8 B7 B
{0 I$ K7 s8 @& m3 Y" G/ K/ [* v
public:
# w* e' c* r; c# i+ Z void run(): i# n+ o o- J
{
: ~) i. H. X( O7 W* N2 y* k if (this->isCanceled()) {
$ {/ X, }" _" m8 a$ @: u' B1 o) W this->reportFinished();
4 b" F- _) M- o1 |; [) g J return;
! E) K; W: ]1 [7 V z+ m. f1 c }
* u: v( `8 { {* E% ?4 M5 S6 Q9 P this->runFunctor();
% k8 D* q% Z2 N7 S this->reportResult(result);) Q* h) D2 l, n0 i6 L, G x
this->reportFinished();3 g) t; t" {4 w* Q; H
}
6 |3 ^/ u8 `2 W+ n) y8 F) j3 ? T result;: P2 `+ F, P# R
};
& l% Z$ `: P! ?# z g( I, K. k( c; }) e6 a* X3 n; x
template <>
* _+ } u# J: S$ q& Uclass RunFunctionTask<void> : public RunFunctionTaskBase<void>
( Y! h0 J% b1 [2 ?) B7 V9 k{1 ]$ D# H+ d. O
public:1 E! b1 s; ]% i# A }' F
void run()- H: {1 I6 u; a: w0 Y
{' y7 B+ [% i7 H+ G7 K$ M, h
if (this->isCanceled()) {
$ a9 @$ M! u1 Q0 h4 N5 f+ {- N this->reportFinished();: a0 H+ o0 s; h5 ]3 Z: O4 W
return;
0 J" ~; s7 ]3 k/ j; L5 ^ }- {% l2 l. Y; d# s
this->runFunctor();
! x& w0 r1 G) x' C2 ?( u& D3 k: Y this->reportFinished();
, i7 P, a: n# f! Y2 j5 Y% H) F } [7 ?. L3 ^/ z% K; V. B1 i$ q3 j
};
' ]- d$ M. a3 l7 w0 ]4 `' p: @. O9 S5 x/ u# b
} //namespace QtConcurrent& _$ h2 c' n6 b# {4 @
$ }# m: G7 r3 A# I' c+ M% s#endif //qdoc6 H) t- c& t1 \$ q# z; O
$ W+ ^2 I5 t/ P! D: n# i
QT_END_NAMESPACE
/ \5 `& T+ ]* AQT_END_HEADER; z% X$ b ]% a; W' l
5 a5 c" p, I7 s3 X, u% q" E
#endif // QT_NO_CONCURRENT1 a: D! @: d7 Q+ n3 c/ q; j
9 A7 G# F$ r* E# E% L#endif
% z0 F, T) x+ t) d3 `6 e1 R, `* D9 P
|
|