|
|
我对syslink进行交叉编译到arm,但是出现如下错误:) L, h4 K4 j7 M$ H7 h, G% N
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'. ]3 u9 ~6 m9 Q' v4 ?2 Y; } }
( [7 A9 i/ I. ] c$ u) s
这个头文件内容如下:* g7 Y) j% |' O6 s
#ifndef QTCONCURRENT_RUNBASE_H7 d2 B8 y; v& b' q1 C: M( r
#define QTCONCURRENT_RUNBASE_H
c6 K' p2 A, ~# v# X$ O9 \9 [
8 ^6 M6 j+ \+ {& a#include <QtCore/qglobal.h>* O5 ~5 V% E0 f/ e
( q( [- W8 z4 e5 w
#ifndef QT_NO_CONCURRENT
7 } R }( h8 i( ~
* _/ ~6 b- f5 { d#include <QtCore/qfuture.h>
8 N3 V3 ]2 c( i/ [5 i. m# z/ h#include <QtCore/qrunnable.h>8 A% F. d# b4 `4 C
#include <QtCore/qthreadpool.h>
3 s: A0 g7 {' ^ v U% k
8 m& v" p1 Y; R# fQT_BEGIN_HEADER7 h; |8 b1 ^( W; V% J; ~; t
QT_BEGIN_NAMESPACE8 W/ g9 s7 C0 T
3 j' `! E8 N' A/ n* xQT_MODULE(Core)
! D1 j6 g" _& }/ Q! c* {. c0 @
1 ~8 @" l3 t4 R4 u; Q$ H1 [#ifndef qdoc
& Y+ u+ [7 P) |2 Z
1 F$ j2 |8 N; h n6 Dnamespace QtConcurrent {
6 p! o$ x# D- Q5 i. _) n7 ~; S& h. i+ L' a6 j) A3 N; Y
template <typename T>
' @6 Y$ z* ]/ `- ]. Kstruct SelectSpecialization
) P! q; |. ]9 @2 s0 D* v{1 `7 j2 Z$ E0 h. m
template <class Normal, class Void>
( N2 Q @' Q! N3 n& R struct Type { typedef Normal type; };3 s* E" o8 l) f2 F
};2 Z, z* J9 g3 u2 s9 o l: b- P! q
& C: e5 l. G$ u( P1 t7 u- Ztemplate <>
; w5 P/ `7 e" a# X, [8 g4 @* Q [struct SelectSpecialization<void>: |9 z8 f; @! t5 M5 ?) n
{
1 D1 u- R' a" }; H( F template <class Normal, class Void>+ j1 f6 H. P+ T4 h3 O$ I/ a
struct Type { typedef Void type; };1 l1 v; U' e. t% U! |' x
};# _: [; L) H/ q9 U- q/ C1 G
! N) P0 f' D0 A! x- A9 qtemplate <typename T>
. w6 y0 O% `; dclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable$ K( q. ?$ v/ Q! S) i# F @
{
+ F2 t" @: d7 o- ~public:
5 f- l. G* y0 l# U QFuture<T> start()% }- K5 T( \ `/ j$ o+ h
{6 `. c( N! h% U* {) d, F+ C& \
this->setRunnable(this);0 A% `& S8 y9 ~& }% O. y
this->reportStarted();& r& P& O/ T4 }' p1 V
QFuture<T> future = this->future();) x% m9 l, m! h1 Q5 h
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);0 g) I" {" h8 K$ H6 W6 A
return future;( X7 q" a1 D( @) H. L+ j
}% J5 X5 |% ]' b# Q+ y! P
: u/ M, r& b4 f- d void run() {}+ J/ f t& i' S
virtual void runFunctor() = 0;
% c: N$ e( j9 t" s$ \. ~3 o2 T: e};
1 r2 [" L) N2 @, }
, m, C* h8 d! _4 H" mtemplate <typename T>
& D* ^ l: x3 mclass RunFunctionTask : public RunFunctionTaskBase<T>
' D1 x* H! C; w$ d) |- O a{ b4 ?) P5 B2 X
public:
$ \0 o, S' ]/ ?4 w void run()1 j' H9 I T# j+ L, d- r
{
: A6 Z" J6 H$ S' \ if (this->isCanceled()) {
) u3 Q8 Y7 H6 t$ o2 z' }! b this->reportFinished();
& ]( f( K0 O! V/ E5 C7 J# W5 T return;
9 @# Z; ?5 n7 Y: R6 V3 m }6 q# |: Y8 z1 J5 V
this->runFunctor();" g' @5 \4 j: b' l/ P% c
this->reportResult(result);
: Z# y) s8 J; b this->reportFinished();* C9 l3 C5 G$ |. n5 w' S
}% _9 U& W: Z( N# g
T result;
7 r, X0 n" y ?2 }3 z+ r! p};2 }" _# O, k" z
- V" w6 d3 H' X& _
template <>
9 G+ m: s9 ?- R7 e2 A* T4 w, @' Dclass RunFunctionTask<void> : public RunFunctionTaskBase<void>
# I8 u+ z. _( ^ [' x0 Y" {{
3 N& q' H2 |' A. _) tpublic:! M p: V8 {+ f* U. H* ]
void run()
8 T# ^( I6 }6 C# I* C5 Z& V, Z {# ]/ B4 f6 x! s: l4 G% u c; }
if (this->isCanceled()) {
3 W; ~0 e: w+ t3 W- w" w4 K this->reportFinished();
: D: @, F. D$ f. d6 @8 f. \ return;
& `+ H( Q& \! R' g2 Y. y }3 p9 M6 O" A! t& x& w3 q0 H
this->runFunctor();& J+ `+ O' Y6 Q. }$ Y+ s
this->reportFinished();9 O) Z7 {9 ^6 C3 X) ]
}
' {4 P5 c: ]3 A0 J' u};
[% V! b- g( [
. I6 a0 J+ x& Z3 I' S8 y: n} //namespace QtConcurrent
- y. F/ U7 C) n6 V+ t. [0 j& F0 n, k% z w
#endif //qdoc5 b1 F! C2 P x* ]3 S2 U
( g9 q# X/ Q- m
QT_END_NAMESPACE
A5 z% V/ [0 J& ]. ~! @0 aQT_END_HEADER7 [3 X4 H8 d% j4 a6 _
! ^2 R: f. }6 H$ ?1 ?3 r
#endif // QT_NO_CONCURRENT7 L4 \, Z3 l$ f/ v, i
" n+ J3 q9 K9 k6 k& H/ |#endif7 V( A. p: s+ y( Q: l3 m) P
9 \6 n1 Z! c0 U/ p2 \) B. }3 U |
|