|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
; n, O9 s7 q0 r6 i/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'9 C) K9 ^4 l6 V8 |
, R" q* o9 q0 D. x这个头文件内容如下:
, @8 {% a4 ?$ t9 M#ifndef QTCONCURRENT_RUNBASE_H
5 j$ C0 N, Y2 I2 _#define QTCONCURRENT_RUNBASE_H
% ^* c4 t6 Q4 v1 {$ H, r0 H3 m, e Q5 C8 d
#include <QtCore/qglobal.h>3 ]. l2 c& K: O, q( l# [( p1 i
: S) _6 x3 I& j$ F#ifndef QT_NO_CONCURRENT
2 a% L7 w" c, t" q% Z W$ z6 l8 c8 o' [1 [# R. B" g
#include <QtCore/qfuture.h>
- y- G/ r+ m, _& P. i#include <QtCore/qrunnable.h>
1 |- _' N# r9 }. q8 H#include <QtCore/qthreadpool.h>
- i/ X- `3 I# i) Q; R
: o/ W4 h0 k3 X& ]QT_BEGIN_HEADER
5 `: x- v4 P0 m% x( jQT_BEGIN_NAMESPACE; h! V/ b" u" x- z$ g! h K4 u
0 f* b* x) w/ ]$ a) VQT_MODULE(Core)# t8 n& C0 S) h0 b" X6 {
3 U; B8 Z6 \1 T4 y& z% f#ifndef qdoc: z. o: V. }+ r
- q5 p2 ^9 Z" S/ I% F! @3 f
namespace QtConcurrent {: E: C }) [# n' m8 S+ R/ F# ?
/ d. _; S1 `0 s# b8 E7 F3 X1 s$ [template <typename T>
& k7 ^1 z6 S& V: h- e0 t6 Q' Xstruct SelectSpecialization
9 l: k4 a- z: r8 _6 z{- l+ b1 L: H+ }( P$ p# ~
template <class Normal, class Void>* \7 D7 m! {6 t: s# S
struct Type { typedef Normal type; };6 H/ A' _5 E7 t2 S5 x" h2 o: Z* Z
};& j7 t' W0 q/ v
- {! u/ Q6 p& j% ]; J. g$ O% f1 b
template <>
" E L- }# ]6 P9 O8 N# Ystruct SelectSpecialization<void>2 j$ I7 w6 `: }
{
8 b6 ]# D* r6 N, P1 j" @ template <class Normal, class Void>( g$ ~( f7 [/ Q& T
struct Type { typedef Void type; };
8 X6 ^1 R- K: @0 l};
% ^ t* Z% b; m k3 i$ a) z
2 q- }2 `/ C. }% U4 xtemplate <typename T>, p8 k& D* K$ r5 c7 u- c& v
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
9 x; R- @) j( S7 K9 z/ Y# z- n{! D4 Y, g& g a. ^" N! x5 n
public:
$ t' }& b3 ]. V8 _ QFuture<T> start()! R: v$ ^- d( p( R% G' [
{
i0 l; I# v0 t1 e) a this->setRunnable(this);
U% I2 z7 P" O8 t this->reportStarted();0 u9 Q$ a6 r3 e" V- V& M
QFuture<T> future = this->future();! D# A* L. B% c0 F# h/ R4 m
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);2 S- ?1 e c. ]( s& T& I
return future;
, t+ \5 i1 w4 J: s& Q. ]# [. ~ } N: J! O. u! v! h4 ] L
/ t; e' V+ j9 ]
void run() {}
7 f4 } o [3 ~3 [% e( P7 G virtual void runFunctor() = 0;; H# N; `# i7 z- X( a* g
};
) K; A/ L, l5 y6 A) \
+ y0 h1 |( w( b( Itemplate <typename T>
: `6 X: r# Y8 X% h4 Jclass RunFunctionTask : public RunFunctionTaskBase<T>
r. ~+ D, r" V" G/ E l$ ^: w{, y7 W9 u3 w, f# k+ |
public:- d( [5 f, c+ B+ U% O
void run()
$ x6 S: q" _0 J) L1 Z$ A* c {
: U% ^/ F( l, F6 r" q& o" P* o- d if (this->isCanceled()) {
5 [6 Y6 d3 T& T7 R# H! t this->reportFinished();
, }2 v& j/ p1 o+ S return;
* q7 F1 V6 G( j2 I; b5 [6 q$ u }
/ m& V4 ` r5 w this->runFunctor();5 }9 T$ P) R7 h1 C
this->reportResult(result);$ R) |6 U% N% ? v% o6 a
this->reportFinished();
' E( C3 ?! h0 Q }
9 l# R8 k6 n2 P# V. H3 c T result;
: I o- U& S2 O};
. _/ X9 f; b# D B2 F- T$ U3 O P. T6 A
template <>% K% B4 S0 r2 c" t* f
class RunFunctionTask<void> : public RunFunctionTaskBase<void>* L: Z$ T* S9 Y+ H& L: { c' P! f$ H8 @4 q
{
1 c4 ~5 K8 T; H5 v3 E8 ]* ^public:3 l5 B2 v. f$ V& y8 M6 U
void run()$ f. ^) P! W! ?3 j% U- b" n
{
% ?0 z/ c' @/ S; N0 Z if (this->isCanceled()) {
( l' t; j% ?9 D u this->reportFinished();
/ j2 P" q4 N: U+ a return;. d' X% f3 f5 ?, D3 W* ~
}3 b9 X% o. ~+ R% O
this->runFunctor();
5 P5 R s7 ~1 _; j$ y* j4 g% g this->reportFinished();
3 h+ L) Q) P% w! I. ? }3 p0 m X' T6 Z' m! O4 _5 Y0 t
};
$ B$ S, U2 L6 @; r f4 \; b; W0 d) O7 z" r) E) c% W! |) r
} //namespace QtConcurrent1 k ?+ R6 a2 e, j \$ [& F
8 Q& ]& d5 ~0 X9 D) v
#endif //qdoc, X/ ?& I2 O% }2 C; A3 B9 ~
* H6 t4 d' {7 t# JQT_END_NAMESPACE
1 c. C6 ^6 [! [% t! ^5 m1 `8 J8 gQT_END_HEADER
; i9 Q! x2 C0 f( K( Y$ w! C6 {( _* {! ]
#endif // QT_NO_CONCURRENT; u, |" d* g- v" V0 ^2 w' w
* m0 I9 V9 J" T7 |/ x& u
#endif, N$ v3 U7 u% c7 i5 C
% |% M% s; z% }/ o6 R( b- }+ x, n
|
|