|
|
我对syslink进行交叉编译到arm,但是出现如下错误:- I) g, u$ |% E) K& t' _
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'' Q! v* @, T8 n" p" A% j# i
, Y0 x2 n) b7 ]# Z# {; W3 ?这个头文件内容如下:9 r8 Y# u) V: B7 P) h+ l
#ifndef QTCONCURRENT_RUNBASE_H
% s( H; w! Z* k8 L$ x1 X+ \2 A#define QTCONCURRENT_RUNBASE_H
) O! r$ L1 t7 J! x
. T/ H% j0 t* y8 I- J1 N9 ?#include <QtCore/qglobal.h>
; W& b! g% x3 V8 b
% {* f6 i8 J7 x6 e+ q#ifndef QT_NO_CONCURRENT
) A& N" l; B; s& A( ~, z$ H
& |8 q0 Q$ i' @$ V2 p#include <QtCore/qfuture.h>
' W @: v: o5 A0 U4 P( N#include <QtCore/qrunnable.h>
$ ]; s! I; z7 i7 s, Z) c, s#include <QtCore/qthreadpool.h># E% F; H+ M7 V6 @+ F+ H
: t; j4 Y ?+ g2 t7 YQT_BEGIN_HEADER
3 F P6 U t8 |QT_BEGIN_NAMESPACE" V" A1 r) F& {! N$ t
+ A: R* q5 ]0 ?* p7 b
QT_MODULE(Core)# V* |3 w) m8 _, F3 D. `! [
+ {- C3 f# \# Y" D
#ifndef qdoc1 U% |( c' g* d+ c6 Q: f
: O& Q* H/ n6 R0 q8 {$ p7 F. U9 ^namespace QtConcurrent {
- V4 k& O A' r9 f" n2 G8 V' c$ n. O4 Z7 m" z0 s
template <typename T>4 m# y5 o2 K8 I4 A
struct SelectSpecialization
, l) s. i6 r" o/ @{
5 |$ u; S6 H- y' D2 D) y O1 \ template <class Normal, class Void>
. H- W3 V( T$ c& } struct Type { typedef Normal type; };- [( d+ w$ ? d, \: \: K/ T& Q
};
1 n/ p& c9 u2 ~ Y$ u; o8 w8 `6 H) O/ f6 X( d2 u7 {* {1 f5 X# k6 b
template <>
: o4 |9 a j; z( s4 D6 Qstruct SelectSpecialization<void>0 t$ T! ?$ C( z+ l
{
8 C7 p2 k& d& r4 ^0 ]& {" g template <class Normal, class Void>. j# l' N) E9 V0 W/ O9 N
struct Type { typedef Void type; };! Y& l3 T4 J' ~9 p. S9 ~ W# j+ O- c( s
};6 g/ V. e7 N3 b5 p/ b/ ~
$ q6 T9 U8 x& k \
template <typename T>% O% R; V+ @- h4 N; \: D/ C! i
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable' k; Q# b8 t( o7 _* t
{' e2 J( c3 k; z+ \! f$ g7 f
public:
M$ M/ |4 {+ r( X* a1 S QFuture<T> start()1 q4 `0 P z6 R- g- J; P9 t7 f
{$ Y) }8 [ ^4 w7 S' W
this->setRunnable(this);
% L$ s) \9 d3 ]: g, X" N this->reportStarted();
7 `0 ~7 {" H5 a1 N QFuture<T> future = this->future();- n" N5 o }$ T/ t! I% m
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);8 L+ D% }2 @0 A- }( e
return future;
( g) l8 ?4 a: {! E; I }- O% \% l- \: k5 ?$ |2 L
$ {: @) R* @* s( E; }7 x void run() {}
, }( P* ~, f3 G3 x/ J" N1 y6 X3 S virtual void runFunctor() = 0;& T: g ~0 W* j! [- V
};
2 ^2 p- y3 G1 S# {6 P5 j# U6 D5 a
$ S5 {0 Y; G9 D' V0 r3 U$ x5 D: Xtemplate <typename T>& m# g' J, V4 A. r% p) S
class RunFunctionTask : public RunFunctionTaskBase<T>8 i% z; W! s3 l& P9 n; I
{/ M! m$ H$ ^3 V' w# Z9 Z1 _. y
public:( Y% y2 k3 j* f$ v, d
void run()
- x" \; t3 [/ ^# ^1 l {, I3 o6 x% Q/ I( o4 h5 S
if (this->isCanceled()) {
d) t. B8 K9 H/ j# A+ e+ B5 L this->reportFinished();
: n$ b \5 ^, r) N" u+ e return;4 |6 h( z$ N5 n
}# j: a1 n, s, z. c1 f
this->runFunctor();
- L- G2 V: K. {0 }* b$ s) ]# x* A S this->reportResult(result);
' Q" s6 t4 K- L% n- s# M" m( i/ q this->reportFinished();
0 O! w7 t0 v. L& _; t( h }
7 }$ R+ L) Q9 L) K3 ?9 ^) n+ q T result;- {: @- M; U: ^1 Q9 _4 N
};" N- @. j* h, w4 Y2 ^
8 k5 @: F5 g9 \8 f' J) E: L
template <>( r$ _0 |$ w( B& O" L1 ~, @7 W
class RunFunctionTask<void> : public RunFunctionTaskBase<void>$ e8 p6 b$ m4 Y+ y
{* F, n, c& }% p @& a0 V) M* f: m+ {# g
public:, B1 C7 n; H6 S+ b* b# q
void run()1 ^! H) l, d) d
{# ~5 G% Z8 E7 C" }1 N9 X
if (this->isCanceled()) {3 Y, m6 E5 H% h( ]3 I, L
this->reportFinished();2 [' m0 i2 |' M% b9 |) _
return;8 r+ P9 b( N1 X: ~) h
}6 v; Z4 Q/ _" t8 I- x
this->runFunctor();
3 r7 z3 B' b- I! h8 ?0 i this->reportFinished();6 g2 f& w K7 n5 r3 w
} R# |* W E1 Q( r6 N( |! |" Z
};- `3 t! q, V. X. R7 K& S3 e( o! ]. ?
- z/ x( v% U! b- b% h} //namespace QtConcurrent
( h$ m# V9 z9 d8 P8 y9 e" A2 |/ G( b7 [
$ Y2 i" v' E9 ~( p& k/ {# J#endif //qdoc
8 N" i* p2 R, L" I1 l% L; f! M: Q e2 Y0 v
QT_END_NAMESPACE1 {5 Q+ Y3 @) ~: x7 T
QT_END_HEADER
$ k& Z1 f# U! v X" [7 e k+ m; \2 N* h1 ^" v" I7 K) X
#endif // QT_NO_CONCURRENT
/ B% M& z3 e# y- K e
% }6 u8 j5 u+ S#endif, V2 i J& g3 }4 y, Z, N8 c
! }2 d& i* w- q) B0 _. V0 b |
|