|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
- E- R# _ Z$ Y5 Q/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'+ X, E5 q4 ?6 S' d& m3 o
- B1 w3 B9 T! d4 h1 t9 U这个头文件内容如下:
, S6 g) b: g: I4 Q#ifndef QTCONCURRENT_RUNBASE_H# e i5 l) e. ~* t y J: h
#define QTCONCURRENT_RUNBASE_H9 s Z) E& }8 c6 X u
2 W9 \/ p/ V2 s" V, r! f5 X, E
#include <QtCore/qglobal.h>, n* C: M8 d& G0 B5 |" T
T" J. Z. {4 {" k
#ifndef QT_NO_CONCURRENT
! B, a# y: W( P% a: x6 x8 A- X. D A$ K" i0 J0 u7 K) D+ @
#include <QtCore/qfuture.h>
8 T w3 g1 h6 B; B& n# [1 C#include <QtCore/qrunnable.h>
6 n) \( H$ F1 Y+ L#include <QtCore/qthreadpool.h>( B& Q7 o, L! R% R1 r
7 b0 X: E d+ Z( y U1 N# [! QQT_BEGIN_HEADER; S- e9 E3 L7 ^
QT_BEGIN_NAMESPACE
6 i: B5 G; Y/ G
; {/ h3 k8 ]& t: r. s, i/ r8 c0 }QT_MODULE(Core)
; b1 j7 A% [. F7 g5 ?5 u' e0 U* o8 A
#ifndef qdoc
. W1 O9 ~, `3 i( Z1 d a& a& v9 L
namespace QtConcurrent {' M" h7 w9 T2 Y- _+ @& t# u
5 X" {: c- b! x/ q' Stemplate <typename T>
* D: |3 H, l) Z/ d$ M8 k3 ]% pstruct SelectSpecialization1 u0 Z( K t, K8 a( A* k+ _
{
, t4 U& V# O* A7 c( U J7 F template <class Normal, class Void># C* y. q; P" l
struct Type { typedef Normal type; };7 D2 ]$ D1 u; f6 V
};) Z. v$ w. g% t$ F* H9 |
Y- s3 s' [8 Ptemplate <>4 b& U5 I% x8 a) l$ B. i3 q2 D ]: S
struct SelectSpecialization<void>9 u9 @- R( N6 X
{3 ^. d0 l! Z. h
template <class Normal, class Void>' p% n( f/ _& h9 Z8 A: [
struct Type { typedef Void type; };0 p6 ~8 [& Y# V: y
};. G) V: s! b7 H
3 e- [' n6 X; y, |5 R l, E" ctemplate <typename T>
0 f$ V5 ~( ?9 j- Z) S3 `) tclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
0 v4 n! Y8 L( H- l) X- ]{
: u }* W7 k, }/ Dpublic:+ P$ V* I( L) r% K" b
QFuture<T> start()( o) j4 n+ O. O$ o
{% p; x' X' l- |9 u% i
this->setRunnable(this);% w7 P1 L2 v; Y. m2 w, h- {
this->reportStarted();9 ]8 v, l0 Q; U. J
QFuture<T> future = this->future();/ q o+ p6 Y, Z6 [5 v0 S& }, p
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
1 B. t$ \& C! u+ y; G9 T return future;. b& J! W6 m8 `) i
}
( m7 f# m7 x+ y& }. c0 L+ t7 t
+ N9 x. a7 Z$ C+ G void run() {}$ l: `' T5 r% ]: |& b$ V( {* Z
virtual void runFunctor() = 0;2 X; U1 K, o- r( q, \# M* a
};! `& f: s4 z, ~( @: o8 G
) s: p: B# Q% q* b, ^template <typename T>
" f7 a8 ~' L/ U( O8 U1 |; yclass RunFunctionTask : public RunFunctionTaskBase<T>
; ~4 w% i( W3 J9 G+ W1 F{' Z. w7 S+ Q9 \+ T2 x7 r/ I8 G$ X
public:! E j0 V* A9 T
void run()3 Y& r% q2 R" R% n" y9 M8 `! d) E) y$ E
{# U4 q- ~( c: l
if (this->isCanceled()) {8 Q: N7 e2 y4 \; H0 m
this->reportFinished();& s' Y. y: e4 u# h2 K6 O# x
return;
, U7 x( k9 L. L! ]5 U }
* e2 @8 r. i4 `7 D this->runFunctor();
0 O. B9 O! S O this->reportResult(result);4 N. O& Z2 h" b9 Q0 c: h C4 E
this->reportFinished();5 o* l- y; e- F3 O4 k1 Y6 S
}
e P" p" f2 g$ a% d& m T result;
) X0 Z* i, @" q& R. X, x. g. w0 E) v};
6 m6 q2 l" ~: t; ^" q
* F1 e) O, b1 k2 Xtemplate <>& o9 M9 ~/ O u3 H
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
# A/ V3 D2 q& ]! r- U; V{. X$ P; F! Q$ b5 t3 I9 c
public:% |" n. c! w/ W8 ~5 A4 w
void run()
" P% h4 o1 V0 R; P7 w {1 L& y$ Y5 g' j- @
if (this->isCanceled()) {0 D( [! e1 f3 O3 V. K2 f5 ~$ e
this->reportFinished();6 S$ e5 {) V* w' z) Z% f, w7 i
return;
( s4 e. X2 ?2 R' b4 M }
- U; F. y. B' Z2 l a/ |$ C9 w this->runFunctor();2 m" c: s+ t0 a) A
this->reportFinished();2 K! v) V6 i6 Q: u" M
}
4 ^* T+ F: [4 `# J};
" ~" C9 F9 g) Y1 `, `- B, }# L( w! l
} //namespace QtConcurrent
* @8 i. t9 n/ c. J: l1 T+ f; k+ w- o3 g! Y) r9 H% d. L* Z
#endif //qdoc
1 q- X/ Y# l# Z( j4 e) p- d# L
2 \: X1 n7 r! Y# M% c4 SQT_END_NAMESPACE
5 l: ~8 U3 o( |( _( g: c5 l3 P0 FQT_END_HEADER( O G# ~% c. j) f1 ?) x
3 D* v/ q9 O) X% D) i#endif // QT_NO_CONCURRENT& p t4 s4 b( }) T* t
1 y) s5 n7 a( @3 W' u- U#endif: ]7 f- x) N' ~% f i; s7 J) x+ T
( \, r* s2 A+ K3 t- R
|
|