|
|
我对syslink进行交叉编译到arm,但是出现如下错误:9 n5 h, c+ x0 P
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
: t+ G+ m! X2 D9 j/ ~8 ~" b& A0 ^9 o9 w2 u% W' I% F' c @
这个头文件内容如下:
: K) P4 Z* ?8 W4 m, {#ifndef QTCONCURRENT_RUNBASE_H
" I# S* k) L6 P; T) D#define QTCONCURRENT_RUNBASE_H
3 o9 j+ l1 H4 S+ j
, G& @, k0 L; X, g; j- S8 Z& S6 u#include <QtCore/qglobal.h>
3 V! x" C2 ]: t3 y2 e, f5 o) B3 S8 V3 ?( u' \
#ifndef QT_NO_CONCURRENT
8 [9 B k" d+ Q3 o3 V0 c8 h! j" B" l6 y
#include <QtCore/qfuture.h>5 w0 M7 D; }5 S. z6 X! p3 g
#include <QtCore/qrunnable.h>
3 a5 u; f1 t. O" s) ?2 K#include <QtCore/qthreadpool.h>
( f9 I: J( M: R
! h e1 o& J, t6 N3 GQT_BEGIN_HEADER
: B5 @6 J4 p" m( D0 x9 rQT_BEGIN_NAMESPACE
, t. m# N7 c* f7 l1 R# W0 J" e- C1 `" B5 v: B
QT_MODULE(Core); ~, D/ `0 B6 b
/ n/ p( t) I$ g
#ifndef qdoc; @/ @0 Q6 `, [! ]
A" z; H' f3 \+ Z) E: E5 r% Y
namespace QtConcurrent {6 p& n" {- W A, ]7 v1 P
/ I- d K: W+ Mtemplate <typename T>
7 ?& L* ?% b7 |; ?. i1 @struct SelectSpecialization, f% h$ L8 H$ L' H+ a% h( p3 ~
{
# g( O E( d v3 f* [& i template <class Normal, class Void>! `; U' h! S B+ F! i1 Y( h5 {
struct Type { typedef Normal type; };* p' U, F" B. p, ^
};- ^& }' m* B6 ] n! M
5 A( h- p9 ?0 e" j5 K
template <>
7 E ^* t$ K: A, zstruct SelectSpecialization<void>
0 P7 y8 v% `( Q: @) b{# r' }! e, y9 t+ x
template <class Normal, class Void>
$ ^8 ?0 Y, E* x8 E6 v, L struct Type { typedef Void type; };. F. k1 k* v7 j3 G6 X- z
};
. |4 y" F* k, |, B) B3 D
. M+ p6 a2 h% H( s2 m2 S3 Vtemplate <typename T>
1 o0 W8 @, e: Z" h0 oclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable L8 i# U* \6 }2 t6 w
{
% `. _* s& l& N5 h* e# Upublic:
* M# R; _/ P6 j+ E! k7 N/ Y, A QFuture<T> start()! b+ f/ ~/ k& O) k/ j! s
{
2 @3 M8 U) X3 i `" p* {) Z this->setRunnable(this);& x8 p+ W; }; z1 b1 G+ J
this->reportStarted();
1 t" N! Y# y+ t* a w P" n) g- f QFuture<T> future = this->future();
6 U! R3 K! m3 E" f) w QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);3 t9 s$ p. W2 G) F' r$ h% v
return future;
9 D$ \9 A9 w) n2 f: S }0 e" e1 b8 W. H. }+ x, A
: I6 i! f+ c& T5 h. {1 [$ W7 C0 B
void run() {}
! E u* D% B- v& q9 c. | virtual void runFunctor() = 0;
9 r. c6 v( }6 B$ z# U};
1 d! x9 U: E3 V: e7 m4 ~+ M8 w8 G5 A
template <typename T>) N8 W1 A" N2 i/ j, ?2 y5 t
class RunFunctionTask : public RunFunctionTaskBase<T>9 t8 C- @1 d7 I- s4 v) a/ `, n- j
{5 P) j" J9 t5 ?3 b& m
public:. E* B2 t" ~. A
void run()
) c& `1 R/ x/ k {4 `* s: c% f, X: b2 t8 ]* r
if (this->isCanceled()) {4 H" j6 z; ?+ Z
this->reportFinished();& \" ^$ K8 A- E( R# R. w7 l2 d1 i
return;9 E. t, _ J) b& E/ b
}
9 g' s! I4 I) Z, k/ v, c4 c9 h. ] this->runFunctor();
2 c4 J1 y4 f, M" J: ] this->reportResult(result);) e$ C% B% B; [* c$ ]
this->reportFinished();
, i4 p6 p' f s, b8 U& X }
% j& Y+ \0 D& N* \ F T result;
s4 I% U3 O* o! k+ B( i};6 _1 [ s1 D- l( l5 |2 n# g) E# E
2 [( \ Z) X# |6 Qtemplate <>1 }$ Y: d) B3 |
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
6 O a9 b2 j7 ^3 V0 g% e6 G" H" s{
' @9 @# _9 g Vpublic:9 G' B- g& ] _8 n
void run()' j2 v) |) C: H/ u8 j/ W
{
% }4 W- u, P5 O if (this->isCanceled()) {. n/ ^. n( n! T0 {6 q
this->reportFinished();
) K/ W8 q2 Y& Z! s1 e5 w return;
! D1 K0 v( p. _, F5 P$ J! e D }# W" y# g8 w8 A" ?, E
this->runFunctor();' E7 }% V- _& D. v
this->reportFinished();
2 d; ]. u8 Z1 m. K c- { }( y: m% X$ ]) d: R$ G: p8 K& |
};
8 H- [& L2 l: u& |( ^6 _
6 e6 I' z1 X, ?5 J} //namespace QtConcurrent* J, J; b2 s' [# d
8 S8 U' ~6 X3 ?! l6 O0 j4 |
#endif //qdoc; {5 s/ a- }3 K" c+ ~+ J* ~4 K! g
6 h' m' z; _) u8 v' v6 LQT_END_NAMESPACE
' Z, h1 L' T0 k* p" E1 N) F xQT_END_HEADER
- B5 J5 E- p" a8 a) A
+ B2 ?3 {( }9 D6 @+ Z# l8 p8 ^2 _6 _#endif // QT_NO_CONCURRENT$ d: I8 F: O7 u+ Y4 }1 S/ ]
7 s' ]% O, ~1 R( L$ p#endif
7 n6 s1 G. a( Q1 J" r' L' X7 Z- q0 h* M- S+ m4 z- B
|
|