|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
! D; O& B P! _3 ^+ F2 G8 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'
' R8 V6 \% T' j6 S" }! ]& a: b0 K4 g( i( L% P W* f* o$ i
这个头文件内容如下:9 G' n* T1 o0 e/ B
#ifndef QTCONCURRENT_RUNBASE_H7 o6 g) ~4 b ^+ O- A: ]" r( t5 x _
#define QTCONCURRENT_RUNBASE_H
- D6 A1 J9 L! ~$ P6 j, X8 ^9 C9 e: C0 f" r8 q, v
#include <QtCore/qglobal.h>
# H! D( q/ S% F. V, C% l1 \$ l1 p( Y6 c( ?; r' }( z8 ~- f2 t
#ifndef QT_NO_CONCURRENT
4 p9 u" I$ q9 Z& u, D. `' W8 b6 ^# H+ }0 t8 p1 u
#include <QtCore/qfuture.h>
# }. n5 _ ?$ t" y#include <QtCore/qrunnable.h>
h9 k$ I. S$ S# @: e3 D5 o' A#include <QtCore/qthreadpool.h>
! K8 z; W3 O, l$ _/ s8 r3 |. R _; j/ L( z" Q6 v
QT_BEGIN_HEADER
: g" |2 T' l5 Q% RQT_BEGIN_NAMESPACE
6 F6 b' v! d* w' L
9 i6 p9 Y$ a! tQT_MODULE(Core)6 ^# l S; x7 N$ M0 U" \. O
) ^ @: U* R, E, c: e! L
#ifndef qdoc: D: Z3 y$ a) A* L& ?9 f: \
5 V/ }" f0 g! Q" Z" O1 J
namespace QtConcurrent {
7 f9 a( w& A# R- ?: E0 }" w' k. z* o: C0 K6 C* o! T3 A6 H7 O
template <typename T>
% {; G4 G. z! O. N- xstruct SelectSpecialization+ Z5 c) v9 c& `5 }4 V1 ?* C
{$ k u4 a. x4 l. B
template <class Normal, class Void>
1 J+ ]7 d' R" [' U( X/ E struct Type { typedef Normal type; };
. v( O& I6 Q. J. y% x( t. X};) D6 M# }( T+ }" ?: r% c w; ?. B
, ~4 z, p3 @ l: c6 ^1 E9 Ftemplate <>( `5 ?9 y7 W# M- ^# j! F
struct SelectSpecialization<void>. Q' m2 R8 j" F" f; S2 O
{- E* K! R$ m9 ], @
template <class Normal, class Void>
' R5 b- w5 d( s8 e' w struct Type { typedef Void type; };
/ ~: r' b1 b- |2 l8 X1 V8 S3 K3 b G};
! X/ _* E7 @; D1 @& m: Y* s A
5 G' i n6 y& }; M& o9 h' A# ntemplate <typename T># g9 }% X* H, r( f5 r: E, W6 O( I1 M
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
( ^8 h! u4 v7 Y{
/ h" z4 i: e4 E# Q' opublic:% }6 g c% S& A& P3 k
QFuture<T> start() [# O& Y+ N$ ^; c0 S% a% x
{
3 p2 D! l2 }, i Y. n1 ^; ` this->setRunnable(this);
' w! K# k; Q" f2 d/ \ this->reportStarted();
" ~1 u5 @) X% G* s& X I! G QFuture<T> future = this->future();
! q5 y3 {# D, b* g7 m# `! |6 k' X. N- N' l QThreadPool::globalInstance()->start(this, /*m_priority*/ 0); b4 h, ~$ x9 z) r, Y [4 R
return future;, D0 c# q! M2 m( g! ]7 Y7 u; W
}
3 u! H4 j, U6 R" K- _* `4 C2 ]6 S
5 k5 T0 Q. O+ |: P void run() {}
8 r2 X4 k' k5 Y virtual void runFunctor() = 0;
5 m7 T2 b# ~4 }# W* Q4 F5 U};
) x) z! s" E8 H1 \/ W0 @$ E& r( Y; A9 G- O5 a t t! x
template <typename T>9 w% x( _/ Q4 f" u. w+ c: s. W( R
class RunFunctionTask : public RunFunctionTaskBase<T>- v0 R4 C& n: Z" K4 s
{ o9 V# Y7 Z [: K2 [. c; p
public:( \0 @- D p$ z0 D- i+ p9 x+ J% p
void run()# g% R1 R) D/ Q' _7 N
{
) t& Z5 k- a; P N A* f5 A if (this->isCanceled()) {
; f" m% D- m5 a- r" c# w8 }- ]: c this->reportFinished();! f* `0 A9 M: R' V
return;1 m, V1 b+ J) M2 ]* J/ W# V
}& E8 V# I% F3 z# ^
this->runFunctor();
' n7 P5 I8 R# \ P9 N2 B this->reportResult(result);
9 J1 w) l+ D. v0 \ this->reportFinished();
. h5 q; I* R: z5 v- Z) ?" a( u }
# R D+ r7 C2 [" d3 x! n T result;
! u8 V# E/ }/ N* G7 T" B# e};
4 W5 f f6 K% U8 C, Y
+ j' ~ g4 S& j3 P: T# Ztemplate <>1 U# u, Z" v3 o/ ]
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
* h* @( I! t4 p! m! M1 F" f" N9 E2 w{
& S% b# w; x! |/ t9 g& zpublic:
) i; u1 \% `, F( s" }+ V! F/ P4 ` void run()
3 r3 c% r. x. Q S. } {3 {- [+ P) ~( o8 }$ M' G
if (this->isCanceled()) {: d$ D- N5 [0 |- C$ y9 ^
this->reportFinished();
6 F; @ R# m9 z2 _( u2 o7 o return;. [% }( M7 h0 `# I
}
; a9 \5 G+ l: `! ]0 h. l1 _0 V this->runFunctor();
2 g4 L3 N& l" L0 y/ r) x this->reportFinished();, F. G9 I4 F$ O) V U i# v7 q
}
; Z9 w) J2 \4 ]; ?# B$ q};5 N* X6 z; \! z1 [
m5 U: j! W1 A; |} //namespace QtConcurrent4 e8 p$ j D% g t0 h: i0 A: L
: O! A$ x6 c, _8 ?. W- `' ^& m
#endif //qdoc" B# c4 k5 u( D" |9 Q. q
% {1 D2 d5 m6 g/ }) W4 U" iQT_END_NAMESPACE- V( E9 F9 |! ~9 q: N
QT_END_HEADER5 [8 Z( a5 [8 V9 Z
8 ~& K+ ^3 x* h- {: {
#endif // QT_NO_CONCURRENT
5 g1 y) }( c( v
- H+ ^0 `+ r5 o( g#endif
/ Y3 p) @0 I y( e0 t* H
/ `& k7 U S* r1 L0 m |
|