|
|
我对syslink进行交叉编译到arm,但是出现如下错误:% P! T/ s" J" q1 b& @8 [8 c' |- v9 d
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
: a! ^" m3 h. a+ r- {7 b7 b- O9 `# S& M A3 @) P
这个头文件内容如下:4 q: \: O% ` U5 ~2 t8 w6 V2 Y
#ifndef QTCONCURRENT_RUNBASE_H( L1 R9 J5 ^ ^3 E) j, F/ f
#define QTCONCURRENT_RUNBASE_H0 O, i8 z/ O, j& {4 w' G1 ^- j; j
/ K0 Q, G, V, c3 Z" c+ u6 u#include <QtCore/qglobal.h>$ ~5 `! i( S8 \. X: n2 L! Z* x
$ ^$ o4 \" W5 k( }# o, H
#ifndef QT_NO_CONCURRENT
/ b. U+ N2 h! B _1 l5 Z9 Z- x6 F2 N) a' l3 E6 f' `
#include <QtCore/qfuture.h>* L) o+ J, @; l# B% Y7 L9 x
#include <QtCore/qrunnable.h>
" f3 x6 p+ { q f- R#include <QtCore/qthreadpool.h>
; m! S, D3 p9 G) u
% j( k2 w8 W2 Q) H& v5 UQT_BEGIN_HEADER
) [5 k' j. _. n9 rQT_BEGIN_NAMESPACE! a M8 Z2 o( r5 s& T T
& q' K- n" s4 O- O1 @QT_MODULE(Core)
; g+ l& a( [, O9 v/ ^" ^ m
" N# p. l: s% Q3 C#ifndef qdoc+ A, ]0 B8 r) A: B6 o( C
+ V8 G. g3 ]2 T, V) r) W+ Z' Y1 p: onamespace QtConcurrent {/ W. Y. ^2 E# E" T6 y
* w J9 Z. v* Q5 I: Dtemplate <typename T>+ `' L, L+ [' q+ x; q% D, u
struct SelectSpecialization
- {/ N9 c" g" ?( |4 `; V) T{0 u, q/ B! h& G7 V
template <class Normal, class Void>6 Y$ H& ?/ J" e, Q& }3 z8 V
struct Type { typedef Normal type; };
( x) \3 B" S8 ]};, C* N. E4 Q* v# b; `" B+ L* n
Q6 `4 Z) i) g& T
template <>' D4 Q' g4 o5 H' O
struct SelectSpecialization<void>
% Z8 `- u9 a Y0 x1 t& H& q{
. B U/ H* \* u' O. k template <class Normal, class Void>, c0 I9 \6 ]4 V$ n" O
struct Type { typedef Void type; };, H, F5 q' r' _3 q' Z" X
};
4 J) c; A3 y( o# }2 ?; X; |! I
0 a- h5 e$ P' h" K5 m; j" z. f) T s+ Dtemplate <typename T># ^8 V. }6 l+ {+ }" a4 r
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable+ j- I$ @0 I+ s$ Q/ {5 P, c
{
5 q/ w* e- ~. X$ {public:9 t- k9 H& p. y" X. W; V
QFuture<T> start()
" b: d5 Z# K8 C! g h {
1 s: V6 [- b3 R3 C( @ this->setRunnable(this);
9 F6 Q, A8 ?( Y; ^0 z this->reportStarted();0 [/ f7 C$ P7 j& ~
QFuture<T> future = this->future();+ D: m- h2 \4 f {
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);- v* {" Y) r/ l1 P: {8 n
return future;
) F) B/ x+ D. E' G$ i8 }, q5 ` }& Y/ O- p/ R# u. b
; Z. T8 d" p. k( C: w
void run() {}
2 y# g% e$ Y. G" K( L virtual void runFunctor() = 0;* T% K* `' V3 }+ [! V, H
};
. }# G& N% x; k* v3 t/ b3 ?
9 G' j$ i& r' }- s, Etemplate <typename T>2 l1 O$ F4 Y( }5 t% C6 q) F8 f% D: }% @
class RunFunctionTask : public RunFunctionTaskBase<T>
8 d" Z0 H2 n3 Q0 \3 ^/ ^% v) E{
) [1 t' k. R# N8 D5 |public:3 B$ o4 s. F# Z
void run()
O8 c8 X/ |$ |. q/ M# h) ]! c3 M4 j {
5 b; C" ^- d# Z# ]( E# _ if (this->isCanceled()) {: X" [. |3 s! c
this->reportFinished();+ W# w5 G! X" D
return;
) s* ?) ]& D7 |3 B4 J! B }" B9 B9 E, q* }! ^$ J: z' e: W
this->runFunctor();5 S, E7 m+ z; E5 H% X
this->reportResult(result);
! S6 G/ {3 u/ y. ]. K this->reportFinished();
$ ?6 j- T7 H/ G9 B1 { }
9 M+ w# F( I1 `1 O) b! C T result;
U& I/ ?$ a R1 A3 _3 X4 _};: S" Y' l4 e; J6 `5 {
* \6 ]- u( I* b! `! i, e! n* k9 _
template <>
, Y+ B6 c- C& Z; W, f! \class RunFunctionTask<void> : public RunFunctionTaskBase<void>) E$ e3 g' [7 p8 o; w# e5 s0 l* r9 [
{. S3 I7 ~3 A) g) N
public:! z+ X$ _' U9 S7 u4 f6 c5 h
void run()
- d) x, r& Z2 x2 T ? {1 `8 E5 @3 S, C
if (this->isCanceled()) {6 n! d& s7 J) V; |3 F& q
this->reportFinished();
4 A- R6 n/ Q8 }0 S# G3 z- \$ l% M return;, g6 F7 r- w+ K
}/ L" T9 H, L& V; w. G- ?$ j, W
this->runFunctor();% k+ M% e3 G) R+ x7 W% c- a
this->reportFinished();
5 N) I) G4 Z [" A7 G0 P }* J+ o: T! ?6 @6 D0 H! e
};
- |, \/ h( f# [, j" V6 i2 K; l' d0 Y# c
} //namespace QtConcurrent2 k/ N# }- {2 \% H. g; D* q- x
' r2 _. Y. H2 N$ ~#endif //qdoc7 B6 p9 Y) n" W9 i1 l
3 o7 b- r3 P/ y1 K6 R. j& z4 m$ N
QT_END_NAMESPACE7 U1 l* h' Q# Z0 a5 w; a
QT_END_HEADER7 X/ W0 M" x% }* Q5 f
. c9 A) G# ^8 ^: p1 `) K#endif // QT_NO_CONCURRENT* ]* E! ]4 q9 i6 s) G) v
8 l7 t5 C) `7 N0 t" S
#endif
( s0 v, Q$ B! H% {6 m; g6 s) S) y4 {. I* _2 Y/ Z- N
|
|