|
|
我对syslink进行交叉编译到arm,但是出现如下错误:5 \/ w; O2 p# ?+ C+ c" Z* i1 ]% M& A/ |
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
- w% |: W |/ l6 h
/ }$ b8 H( b3 N$ O* c S这个头文件内容如下:6 ~7 E% E1 w8 }; B, @ z3 C
#ifndef QTCONCURRENT_RUNBASE_H
" T/ i3 Q ]1 U" v2 v8 q5 V, n9 h#define QTCONCURRENT_RUNBASE_H
4 a$ W6 p; G2 H1 r1 Q
, @6 Q7 [/ r8 k#include <QtCore/qglobal.h>
6 z) g8 J: }- q( s7 e8 ^ _! ?1 G0 f" q9 s5 w _8 r! Q& W/ X
#ifndef QT_NO_CONCURRENT
# h7 ^: e( {+ b* A* c' Q5 A+ }4 z, t8 U
#include <QtCore/qfuture.h>% i# K/ p4 ]" L
#include <QtCore/qrunnable.h>
7 B) T- b( Y# s6 w1 H2 ~6 r#include <QtCore/qthreadpool.h>' G9 P5 [0 R% T7 a+ f% W: E1 ^3 f
3 X) n V4 e( v- M O+ W" f
QT_BEGIN_HEADER
$ g; M" ~/ d( m9 i# B* hQT_BEGIN_NAMESPACE4 M. Y9 U4 k3 U, k. k( F
0 `! j$ m+ { Z" E* K* M; rQT_MODULE(Core)7 C0 @3 i7 i8 H5 }
/ o( t# I9 G4 x: M
#ifndef qdoc/ j- e. l" J1 r/ b- h& A
% Z7 T5 v& n2 Y2 V( O. `- t3 o9 M" i2 d
namespace QtConcurrent {& f) s9 L) [3 Q+ s' q$ z
( W. A6 ?+ s1 M! c" p0 ]/ itemplate <typename T>6 Y6 c* H# P3 \8 Z
struct SelectSpecialization
& _3 ^; M# w8 t' D5 S4 d) Z{# G3 O1 ?: v" Q) A' F
template <class Normal, class Void>! f+ `9 H1 B. {
struct Type { typedef Normal type; };: `0 \3 i& J* | Z1 D. i2 f
};* p3 X: E F1 z; |
2 F0 ^1 M x6 M- p) j' F( L
template <>6 D7 H6 ~8 V1 r+ O0 o
struct SelectSpecialization<void>6 K B2 X- p! L- `6 N
{% G) q' g* b4 ^, n0 R9 X+ u- P
template <class Normal, class Void>
! Y8 b% E( K) O% J struct Type { typedef Void type; };
& Z" L5 H) J L k};
$ `1 r6 K; ^; ] ~- c* r
6 M. g: K4 |( l, b( c. Y8 U btemplate <typename T>
. E/ E" Q' Y# C3 r+ Sclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
1 L) j+ O, v1 I8 U% z" \{
& |' s) N' J3 @public:
" n0 L" N/ X1 B1 `7 g6 ^* H$ G QFuture<T> start() k% B0 I( X! Z
{8 T1 ], i1 I. i+ J$ d
this->setRunnable(this);
( l3 g9 Y! E4 r5 P5 Q) R0 X this->reportStarted();/ V+ r S0 [* d3 E4 U4 \0 A9 G
QFuture<T> future = this->future();2 t1 r# v I4 A# y2 Y' r( p
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
, X5 @- S, m, z, R d9 \ return future;1 N, {) i8 Q( C* R" v0 U( {/ M; y
}8 ]. X- `1 K& K, A& f% B v- |, H
$ v. k% p/ ?+ U9 v% u/ j R void run() {}
6 C6 D3 I* |: z$ Y virtual void runFunctor() = 0;
6 \* c# `5 J; K- W9 {};
' v. r3 s5 B2 q, ^' ]. w3 E
* v) @, z. j$ O2 N; V) R. M7 g/ Jtemplate <typename T>
7 K# z$ w3 E: _( k9 G) dclass RunFunctionTask : public RunFunctionTaskBase<T>1 k, T" d! X a3 a- V' B i
{9 A: j& J, A E5 P* a2 K
public:
5 f. I5 c) `. C- c, w void run()9 \! D W1 H" T! N
{5 P" a& T+ [9 P2 E
if (this->isCanceled()) {
7 J6 x6 v" q8 Y5 z; c this->reportFinished();
" s1 W" w: C- i9 T return;4 S, U+ o* C# G) n3 N+ k4 m
}/ S6 N7 y* P E. @
this->runFunctor();9 @4 l2 c- w1 i r5 ?+ N
this->reportResult(result);4 N8 m5 U* L3 _. R5 a
this->reportFinished();" E$ c' m. M6 X6 y* P) G: A
}9 t/ g4 n8 t- ] h4 ~
T result;
, L* l7 h+ Q! M};
& G% o) M/ @1 _9 V$ I. h5 L* K9 h& {0 F; P |: a: E8 N+ O/ g. h2 w' ^
template <>, G# d: k& V: ]: `) X
class RunFunctionTask<void> : public RunFunctionTaskBase<void>+ C$ ^6 K. W" d: }5 w
{
2 n( e w& s; ^ f" k. ]public:
1 w8 K1 r: p$ Y# x' z% ~! q# S! F void run(). b4 D5 B9 l* x% C- R0 q {2 {3 f, |
{
7 V. b. Y8 H" e6 w' M if (this->isCanceled()) {
5 d; Z8 d+ {! n' X: ~: X7 f2 b this->reportFinished();& u/ ^' p" n' F8 q3 x$ F
return;
4 n. J- R" ~/ k) e) t- j; M }
8 s# R; |) f8 @6 f+ v7 W this->runFunctor();% B% R/ M; P& ^7 l1 t
this->reportFinished();: i0 q) ]% Z+ p, K v6 I
}
9 Z% R; @0 l+ L/ s};
& _# M/ @0 ]3 w, f( ?7 W S/ M# a' h. [/ ~8 P
} //namespace QtConcurrent: `$ ]4 K' d* Y3 L( ~% e5 Y
2 e, W1 r/ O% B6 G( P4 U
#endif //qdoc
, \ [9 v" e% P& G/ S# o5 _6 C2 `% [1 i; c
QT_END_NAMESPACE
: s. }+ M0 k. e6 p+ nQT_END_HEADER
7 A7 m& F- D3 A% S* ^5 u/ G
' z; P( F" G$ Q#endif // QT_NO_CONCURRENT
0 ^1 Y5 Q; h5 U2 ]6 R& `# C4 l$ e5 Y& O
#endif
4 i. f5 b' [* e( N) R8 U% v2 O2 F3 t+ M
|
|