|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
% B$ T/ e: r1 q) J- O& `) 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'
# J6 o- T* G2 J0 E2 a5 c! M8 W( @
, u/ r1 O# G8 [) T7 e; ^这个头文件内容如下:: m' B$ E9 J/ V- ^# [5 z$ n& F1 d
#ifndef QTCONCURRENT_RUNBASE_H
& @+ {+ Q* q2 m# V7 D# X/ }/ U#define QTCONCURRENT_RUNBASE_H5 C: K5 C1 y- {' T6 J4 Z4 r
" O9 k! _; l( G w#include <QtCore/qglobal.h>% {. S/ g* f' s6 ^1 g
& l# d Q4 b! _
#ifndef QT_NO_CONCURRENT* v# \! K- n: c q9 m6 o
- b: s1 ^- p: t' d0 o
#include <QtCore/qfuture.h>
, C( d+ u4 N( H2 J- W#include <QtCore/qrunnable.h>' W$ ?6 B X. w2 K T( ?
#include <QtCore/qthreadpool.h>
- t# L1 D( t2 d5 j- M9 Q
, {3 Z) Q7 f; M' Z: R/ |/ MQT_BEGIN_HEADER, Z% {1 o) h% q; e3 e+ _8 I
QT_BEGIN_NAMESPACE
- R: S. K9 |7 c# O/ f2 A3 V7 A6 h; v. X3 b6 R* x
QT_MODULE(Core)5 \) o' |+ O6 B$ j8 A& e
j/ M+ Y' k( W5 i! ^! N#ifndef qdoc! F6 A* C H; d% C- {% b8 Y
% k K0 I! ~7 K
namespace QtConcurrent {2 {$ T- e. `4 \: H, w+ v3 P
* D# M' h/ y. i$ u' l4 `
template <typename T>
% C. S6 P8 s6 A: y! Q" e9 t; ?struct SelectSpecialization
9 ? j+ C, G- s" e2 U. P7 F{
$ X; c) N3 Q% Q# u1 j template <class Normal, class Void>
! q; U9 g& E, `% ~; r struct Type { typedef Normal type; };$ A7 i4 ~$ u9 z0 D$ a
};
' B; t/ R, y, S/ W5 U' W' g0 q9 m; Q# A% C9 r+ Z. g
template <>7 L! Z" ^3 u S% f9 ?; N2 b" w6 k
struct SelectSpecialization<void>
* N6 g/ O' a* F/ l+ c, }% v0 c( f{: ~" S( ~3 B" h* ]8 r3 ` L/ T
template <class Normal, class Void>+ D2 o) U, X; w1 L
struct Type { typedef Void type; };0 U/ h( F6 {6 a. o7 {# i
};7 J: t. {9 s0 \) R: v
m% l( a. k* y! Ctemplate <typename T>
+ _0 ?9 \& T9 aclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
0 E. m2 B: y- g: J. {* v* s5 L{
- A' X7 j3 q+ n: x! o, apublic:
) l+ u% u! _* y' j# e QFuture<T> start()) ?/ p+ W+ ^$ E2 J
{$ R- o4 h% r* p# o8 C/ @; e
this->setRunnable(this);
5 ?( o& w2 R& v. X' ]( S5 d this->reportStarted();
* W: i: ` j+ O% ] QFuture<T> future = this->future();
6 x' i: G: U8 Z" b. T QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);5 |+ @! G. S7 |) p
return future;/ A( w/ y; a& }# W+ ?. j8 \
}
7 }4 m4 P" O: M2 }$ n/ V. t9 B* c4 P
void run() {}
8 R) a8 P# n. G8 Q. f virtual void runFunctor() = 0;$ L( K5 R/ m, c9 a
};
7 \8 H% U) ~" }
: X! [) C) I3 Itemplate <typename T>* ~) U: Q& B/ Y( Y+ @0 l. c
class RunFunctionTask : public RunFunctionTaskBase<T>9 U' u' B7 ^3 d: \5 D. h4 _( s
{
4 q" p" v2 V2 y% t" I( Upublic:
& n8 Y7 I+ l$ U9 m4 W( h void run()
3 L) }; ]9 S- B7 I {
2 m8 @* w' M; X, J* p% ~) x+ Q if (this->isCanceled()) {: P; g" a9 Y/ q
this->reportFinished(); |$ m: g/ `1 _3 c/ S5 T5 ]
return;
2 ]- R" O! ^) Q7 S/ c9 c }
# q; W8 ]( J+ q1 R3 o this->runFunctor();/ W) ], K% B7 j" E- V" b# H
this->reportResult(result);
U" L1 x) ^% a8 q2 q! x8 o this->reportFinished();: u+ X$ H2 ]0 J9 @
}
7 L" a; n* I+ l1 h; [ T result;& ^) y# u2 H8 N; s' K
};) K. s' G2 Z8 A9 p
9 K# Z" m' e f8 v7 W/ L# B/ ltemplate <>8 O- [9 u, ]0 ]- l6 W6 E
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
2 C" p% {/ F$ c$ A( n8 j{4 e/ H1 r3 _4 Q* z! G. W
public:: i3 k8 v( I# `+ d c
void run()
5 K8 Y6 U9 O6 l9 x {* x! Q {
' y8 X* Y9 z( ?. H* L if (this->isCanceled()) {! @- p) n& B4 t- W
this->reportFinished();5 P* c* g3 j# g& `
return;9 x% {* q; a, _ o$ Z
}- Z; I' l9 M# Z+ q! w; p( ~
this->runFunctor();- ?6 ^$ ]" f* z, B Z' b
this->reportFinished();
* t" `" u4 X# Q; N& Z }
7 w" Q) U- E+ |/ }# [" V};
+ z3 s" b$ C% l% [$ r7 E. A7 F2 O; M% |+ o3 p
} //namespace QtConcurrent
( E% t9 u2 _; {: P+ L" u4 e! N0 H: ^( v0 _; G. n
#endif //qdoc
: T5 ]% K* b& m) L c* B3 k& j- _8 m: ?* }* `' g M' r9 g
QT_END_NAMESPACE
* ]* z; R8 l/ ] r) l' u2 ~# ~QT_END_HEADER
& o; f6 V6 Y" U0 _0 i1 y! F" m0 v! K ]( P9 I" a/ x A
#endif // QT_NO_CONCURRENT
1 g# |& {* @: [ s* D3 b& e3 P8 \" l4 V- c) J8 i6 C% r9 t
#endif
* X( \. E. y) _2 h! P4 X/ `: V0 h1 U: u0 e. L3 k
|
|