|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
& m% k5 [7 i1 M" L/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
& b) |0 x1 L2 X. P0 n" e, D% s9 c$ \
这个头文件内容如下:
" C: R* T; J5 y& Z4 Q- g. R#ifndef QTCONCURRENT_RUNBASE_H
; m: i$ \8 y) K#define QTCONCURRENT_RUNBASE_H
, M" \; \) {" N: a5 [, K6 u( E) Q
1 H8 F$ x0 w8 X6 |) Q#include <QtCore/qglobal.h>
% [, ^# H9 c' @/ c. ^+ R+ i6 p/ [, P6 I8 z! l
#ifndef QT_NO_CONCURRENT
' H, t) f8 z, z/ w% r
- J) z! x! T" |/ k! ~/ h0 z1 c#include <QtCore/qfuture.h>' q( `& N& \& l! Y0 A4 T
#include <QtCore/qrunnable.h>1 r! ~+ S+ T3 u6 E Z8 w, D
#include <QtCore/qthreadpool.h>- i( Q# q$ ~; E2 S. D& _+ ^
7 K0 v4 H9 l1 X5 w6 S2 y' i) y: F
QT_BEGIN_HEADER# s: F X" R) q6 J0 U" S
QT_BEGIN_NAMESPACE2 @2 e2 ^3 @- F
4 g' Q0 }( C6 t$ X$ r+ t3 ~, |QT_MODULE(Core): |! t! k6 J8 M! J
/ L/ _, Z0 U" `" V
#ifndef qdoc
4 @( l6 u% n0 V, i- f5 K# J/ b# e+ w1 p
namespace QtConcurrent {$ }7 |+ r' r& v$ E$ P, x
0 }, X, U, I- q! d
template <typename T>
( o8 V4 s& M* ~' _/ hstruct SelectSpecialization
6 e% P! O; d0 ?{: h, {# q$ f& n2 @# T4 f
template <class Normal, class Void>7 R+ F5 R- Y I* F) v- K
struct Type { typedef Normal type; };
|6 `9 Y* I/ L8 l2 O}; F/ c+ e% }, y5 a0 I$ y- u
2 `$ ~" p- g; _$ q; M4 Xtemplate <>
6 \! ]% `: p3 g) I% vstruct SelectSpecialization<void>
7 C4 u" p9 t. y/ J# ~8 Z4 F- R; R{ b; T9 c$ R* E
template <class Normal, class Void>
% V3 [- @- ?. F2 O8 R struct Type { typedef Void type; };
4 m& u9 L2 }- {$ y1 H; \1 d% r& ^};
# u M4 U6 P" S& t/ X' ?
! U9 K! k. B# V' t; Z2 R+ }8 a3 dtemplate <typename T>
$ d8 Y/ }! u A2 p+ n6 gclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable( q& y# b% H' o+ O
{
: ^! f. |8 r9 Q' Y Mpublic:
+ q9 @/ n5 X$ X" j& l QFuture<T> start()& j1 F! h: {* w- M8 |, q
{- p# r! e* u# x( s$ { ?, ?
this->setRunnable(this);
# n R! n+ c" X' v) w: n this->reportStarted();; ?" ~$ k$ \4 `: c0 v1 n8 r% j( F) T
QFuture<T> future = this->future();
; m5 |+ ^8 k4 o4 A l/ q0 ]# r5 ? QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);- w- e$ a" ^# {2 g/ |" h9 z$ A' ~) R5 z9 T
return future;
) s8 e/ H* e3 c, b }
! m% C' U" l* L; N
4 l( R% c! S' ] ^9 H7 X5 @5 t& y/ `- H void run() {}3 C0 b* y' F7 H) Z
virtual void runFunctor() = 0;
: A" y7 G) `% B/ X7 X};3 t3 x# x/ m8 B$ f0 A9 D0 t7 h
$ q# F( `# S0 X& Y# [# N; Ptemplate <typename T>
6 G& u% \- g# A. S1 Dclass RunFunctionTask : public RunFunctionTaskBase<T>) j/ B4 S/ x& M' m
{2 U8 h4 _4 g8 @* F+ |+ [6 [
public:0 N/ L1 _0 B& g# A8 l
void run()
1 g* Q: J! K% x4 q: H5 ? {
+ K3 h; B( e2 F+ d if (this->isCanceled()) {1 T' C6 `- h S- T. ?% U
this->reportFinished();
% i* a4 D. Z& r3 W5 O. Z m1 o return;0 G, O$ A& v$ _2 p5 _" F
}
8 {# g' T: o; D: H% M M& t this->runFunctor();. X! f2 S3 y/ R* k& F3 ?% h7 ^) P
this->reportResult(result);
+ E1 \$ W' v; g% M& T& b% q this->reportFinished();7 P, d& F( b' [3 T$ R* u5 h
}. E2 n! p/ [$ Q/ C$ q. [# d
T result;1 C+ S- L; I0 w
};( @! e; l& V3 e4 m+ `; `/ `3 G
! F' l5 f! @3 h0 e' R# @7 }: Qtemplate <>* ?4 z2 K; c$ w' @3 e1 V3 W
class RunFunctionTask<void> : public RunFunctionTaskBase<void>1 Q7 q( A8 | l2 E( p* {7 x E
{7 Z: b% {/ L8 n6 S! x9 v3 K
public:& L& W9 U8 {8 j
void run(), S; a: K# n3 w1 g7 m z' V
{
, f3 x$ ^2 x- k! B/ x if (this->isCanceled()) {
# w4 N9 E1 l3 H7 x this->reportFinished();
2 H3 E' J3 `/ K7 ]5 d return;: w) w- ]; D" n* A, [% @4 m( ?7 l
}
5 O2 B: L0 a5 v5 f this->runFunctor();
' o/ @8 ]8 n7 o$ r4 ~ this->reportFinished();
, c9 A1 M+ o' h% N% Z. v9 ~ }+ e0 S( ?: g _ d# ?" E: d
};0 O! b- a, J: W" J( b# K
* }+ V; T4 V. y+ |" T8 s
} //namespace QtConcurrent7 R( {7 A' A% W9 S4 ^
* D) V% [# h3 i, h5 V
#endif //qdoc9 q0 O* S# s8 p) x8 a( ~. W
6 n- Y8 U2 W, j, }5 U: g
QT_END_NAMESPACE
- e% m+ `, Z9 `% E+ YQT_END_HEADER
1 K& w% a% f6 J* |5 O ?9 {
1 c! n5 J1 Z* t, Z#endif // QT_NO_CONCURRENT& N! \0 B1 P" l9 Q3 [& F) X# Z( [
2 c3 d. _% B- W" p
#endif
! B- Z* n4 o/ {3 a
4 q5 m- }( s" p7 c2 q: ^: K |
|