|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
! f5 r% x7 T/ n6 y9 K/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
& X0 f; W4 M# }4 Y7 ?; r$ P3 u/ d6 t6 c0 e
这个头文件内容如下:
( g+ z) q( v$ B H& z#ifndef QTCONCURRENT_RUNBASE_H* D- X# k0 w$ `9 c
#define QTCONCURRENT_RUNBASE_H
`2 e! b8 K) U/ n3 Z8 u1 ?/ C- F
, N6 V1 k/ Z: ?/ N#include <QtCore/qglobal.h>6 D* V0 R2 u2 f% w
( X6 A( r1 G; l4 f/ y
#ifndef QT_NO_CONCURRENT
3 t" _2 }5 d* L; q! v+ |2 k O* f# I7 C9 a: z
#include <QtCore/qfuture.h>5 V% b% w9 n: n; n3 T t" w
#include <QtCore/qrunnable.h>! R6 V/ w {. m" ?% s
#include <QtCore/qthreadpool.h>/ Q% |2 g G# N5 c: H- Q; l- r
" Y$ Q3 Y+ d, [- @
QT_BEGIN_HEADER
9 K# p7 K, w% C4 ^! l& d% QQT_BEGIN_NAMESPACE
, \% U, ~' |! T3 \
% O0 T& o) \. M( q6 pQT_MODULE(Core)
) O9 F( F* ]5 ^! I2 j, f( G. M
/ R( Q8 S: a# A5 h7 ^) d( n+ U#ifndef qdoc: i8 m2 c- \! r, x" n
% l6 a' g5 a$ r" T9 H# ~# W+ xnamespace QtConcurrent {
' ?8 E8 p( y6 L1 ~+ R% D
1 X0 \5 }# d2 g8 e+ ^8 Q" Gtemplate <typename T>; J* ^% t) M5 _4 w' A. o
struct SelectSpecialization
( W! F' f* G" B{
7 N! ^6 O( m+ T7 j, Y6 `0 W template <class Normal, class Void># R# ]7 e, D: S) X* {. _/ H
struct Type { typedef Normal type; };
3 n) P! Q2 W' e$ j$ s};6 |" W5 ]* [4 K
! o3 e6 _* R, T
template <>
. X$ z0 h) _0 e/ |5 t0 \struct SelectSpecialization<void>
0 G8 k2 M! C8 ]% {' D+ {{ N+ f a) n: S* K' U' b( V$ `
template <class Normal, class Void>
O$ L+ }/ b# F2 F struct Type { typedef Void type; };
+ s( v5 S# ]5 g4 {3 M6 p: I" @' v};
2 o G9 `; A9 Q4 F. P7 w. c- p! M: j) y: b. j$ l
template <typename T>- w8 _, I# y2 B. n- h7 E& h
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable# }6 H% Z+ n! a. }0 p) B; V7 h0 L
{
4 p7 m8 ?+ S5 F8 f+ `public:9 j7 C5 n- g: i ~
QFuture<T> start()" q6 E+ N# ^( ^6 u
{
% ~( p7 ~: f( i) t) ?! L this->setRunnable(this);
6 ~1 I- }5 J& W8 \3 |$ g/ G this->reportStarted();4 A& e2 j, {7 i- A
QFuture<T> future = this->future();
; V! j7 [+ m" S+ | QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
$ X4 t8 Z3 `( T" c& m return future;) U! @3 u% B! @: s+ V4 M+ g4 g$ {
}
3 d/ X; V9 }- H
l* K( d$ U0 b+ E" S void run() {}
) s0 b( h# k1 l7 r; w virtual void runFunctor() = 0;
" z& T( k9 `4 F/ {6 p};
% Y+ P: b. y9 v+ o. q% ^9 w: B; L) ~& v a g* i4 o8 N! [) u
template <typename T>
/ y0 F# u# `- c* |9 }class RunFunctionTask : public RunFunctionTaskBase<T>8 ^9 u7 w* ~% ]( G0 ]( H S
{$ x! j5 [) g4 a7 F8 L+ v9 M) ?
public:
6 O! l6 _" p# |) L! F- y6 X void run()2 R; f! x! A2 A5 ^
{
% c) ]7 d4 Y+ x# ~; R if (this->isCanceled()) {
U- ?+ |, j: {5 P+ V# u this->reportFinished();
T) U( W+ n. I5 ^: j0 Y return;
6 v3 B( _3 Q3 c7 j* ?, k5 C! s }
9 R' h! ~& {: _0 }8 g/ c this->runFunctor();
( R A, d! t B this->reportResult(result);
: M" r) {. i; a% H this->reportFinished();; S$ w) `$ }+ ^1 h1 V: H
}! q; P# B/ v% p
T result;
' c- h# I/ K5 P};
. {% Q7 x6 d9 h7 `# y) m7 t+ C& W# `: w, e2 C8 F# y2 o& G
template <>3 t6 ]0 T( i1 f# c
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
0 l" Y/ n* ?5 P+ C5 S& K$ e4 E{
9 ~/ x, c5 X* G& S: U) Qpublic:
7 a+ w% h0 A" u: u! x1 j void run()
) b- d) V0 Y/ W9 F {
, {( f8 d7 h3 s if (this->isCanceled()) {
/ B7 q6 f7 ~' N- l3 U) [ i U this->reportFinished();! E G$ S; j: v% g+ ^! H" i
return;
V, Y4 B2 k4 k! B# x. M6 n }
' N, e1 B( E& b8 v& q# V! o" w this->runFunctor();% A. N2 u' r! b w+ C
this->reportFinished();
! k* }3 P" ]. F" P' f }: i/ O9 {# m3 A* r
};
- `5 h% q/ d6 u/ W0 {; n( I1 F. v! q. J: x
} //namespace QtConcurrent
5 h: J n$ h! N4 P7 V. p6 h/ j
0 x& \# Y$ l6 V1 ^* h' Z) g# C#endif //qdoc8 L0 L+ \) a0 h# T
) l: i2 h5 V+ Q# M! y0 y1 \) J
QT_END_NAMESPACE
5 R* _! f; C/ ]QT_END_HEADER6 h0 t9 I* _* t) N5 m1 `
8 G# V u9 a [; a
#endif // QT_NO_CONCURRENT
2 z0 H* ^) D# t
1 Q5 L' `, L% a$ p/ u8 y" [#endif% A; p0 b% a) ?. m* i2 Z+ y
$ P; f( c9 O* y7 j" ?6 T. C
|
|