|
|
我对syslink进行交叉编译到arm,但是出现如下错误:) ~, A. Z/ z5 }! b5 ^4 G
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
/ |. A* G- u; U
3 f% Y9 ^) J v/ V, S& I% |5 ]& D这个头文件内容如下:
' a2 Y" D3 j/ p6 f4 w7 R& l& l1 h1 Z#ifndef QTCONCURRENT_RUNBASE_H) k+ A8 T1 q7 D* X8 {4 S
#define QTCONCURRENT_RUNBASE_H$ ^& |0 S& u7 {1 E C3 c+ c
% y& D- M1 V! E8 X& G6 c2 D) L' {#include <QtCore/qglobal.h>
* ?5 F* I# T3 k# Y* x: N( A0 P/ r0 p( [: u- b
#ifndef QT_NO_CONCURRENT
, f& V) _* y2 T9 e! C% B8 {- p# Y& Q
#include <QtCore/qfuture.h>
* t" U8 e& a4 j; W) U6 G#include <QtCore/qrunnable.h>
4 w' \, y; E% _0 k) [/ \#include <QtCore/qthreadpool.h>
9 J. b0 x2 J' P4 ?0 {2 u" J$ ^: a- H% ?5 d, o3 C8 R
QT_BEGIN_HEADER9 H- R; C! { }4 h' h
QT_BEGIN_NAMESPACE4 U4 ?+ x4 ]6 I7 S% H: ~, O- K
8 \ [: S. t- d+ l. ~+ _* L4 x7 P$ V
QT_MODULE(Core)
( A, \- L2 o' M9 z1 a) D
8 k7 ~. j3 [5 R" a#ifndef qdoc
" i N/ t) F8 k. A* C4 a' M! {- Y, w: J' ~, N, n
namespace QtConcurrent {# R9 ?$ l, |1 [; j3 P' Q
# l z4 X- a7 o4 k4 x+ A* ^ v+ J2 \* _template <typename T>) |3 N: {/ {: Y8 X8 n
struct SelectSpecialization- |5 V N4 [# P3 M" a! n* l. C
{% L" d( O! |( H) [, ?: x! ?* Y7 o
template <class Normal, class Void>1 L7 z7 R( w' j- C; b% @
struct Type { typedef Normal type; };! H" h& d! c3 ~7 }% b0 Q
};
6 @, E9 z2 X/ L& o4 r* G! y6 _2 \7 Q2 g( ?9 [5 j8 ?0 y
template <>/ C' J* n. }/ n5 d6 G
struct SelectSpecialization<void>) S3 }' V- {5 H% I7 f4 }
{2 p5 C5 Y1 j; p
template <class Normal, class Void>" q9 y: }' E1 [ r5 {' ]1 W0 d
struct Type { typedef Void type; };
( M: W3 L4 i4 l8 N5 o};
1 h8 t9 }' N n3 _! H# s
& \5 h2 S; R8 _; j. J2 [7 e& atemplate <typename T>
( q& Q; C9 @4 N1 Wclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable0 i' {9 P: k7 o/ r8 b0 T* I! _
{! R: N! \# s- j. w9 v3 H
public:: o- i1 k- H+ h9 y0 A0 r
QFuture<T> start()
( S2 l' w1 n+ Q! M; F( O1 ^ {
& Z A- l# t) p! j8 P9 |# b this->setRunnable(this);( h& [) a" y+ i! H* T: b6 K. w
this->reportStarted();
& M; ?' G# E; J. w/ \* I QFuture<T> future = this->future();9 u) y6 H( `% I# h
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);% i1 Q, m! _, R. p+ b2 R5 t
return future;) H6 c/ ?- u# @( @7 }
}: d# [8 i0 K3 `4 r
& g1 N' p2 z+ R void run() {}
$ c/ q' S4 h* {2 i) ?5 q, j virtual void runFunctor() = 0;
0 P, U2 X I: S+ N};
" _6 D5 A5 }) c' V1 ?2 d4 u5 k
7 @, f6 o6 Z m0 ^! P Utemplate <typename T>" H! T8 J. H5 I ]* D
class RunFunctionTask : public RunFunctionTaskBase<T>
9 [0 i m- K; L{
% m4 ~/ U7 B) H. \+ ]6 e. Xpublic:! x8 E4 \. x- N0 H9 j3 u
void run()
/ L+ Q/ N9 l( B$ Y5 r {
4 f3 s$ t6 u- ] if (this->isCanceled()) {4 _8 o" i* @- U5 J0 l% {
this->reportFinished();) V0 e3 _4 Q Q/ m4 q% H
return;
. @" \/ E3 q; W. P& ~/ } }/ e M& v3 N1 Y$ b
this->runFunctor();
0 i3 { {( H) m& m+ D, I1 Y! c* Q! ^ this->reportResult(result);
* l. Z! ^: N0 w ~8 I this->reportFinished();
& {7 `( P7 x! x: s# R* W) J }
% G: O" l6 i3 w$ w T result;
" J- O8 Q( l# k$ e+ J/ a};4 L5 J( R, T. ?6 ?$ Z p9 _* O2 z
; f2 M2 {% H# V+ v1 X8 c. Rtemplate <>! O$ D8 @2 Y8 y
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
- n$ _5 `' z7 ~4 O6 x{
8 v6 w: p+ R. `* Bpublic:
6 D8 F# g8 H* c: ?& i. `8 S9 l5 ^ void run()
; {, A/ S# N" B# V* E {
2 _5 `& n# F9 h( m if (this->isCanceled()) {
) l! c/ t% q( J this->reportFinished();" C: `' b/ I& ~2 H' s. I
return;, L7 J" i J# t( h" J5 i2 K4 `
}
% P6 c0 {* \+ R" N" E8 u9 y this->runFunctor();
8 i! @! N5 D$ o this->reportFinished();
# E+ }* Z, g9 P }4 R3 m8 ~! ]: W" G
};
( P+ \2 S$ z h4 a* E4 g
- g/ J( ?* X/ _6 I3 g& i% Q} //namespace QtConcurrent+ H2 @0 D! U, b
- D( Y8 g( O7 z* \( A#endif //qdoc
( n( y3 z% d6 ?$ h0 V" q" l& K9 T% k' Q* i) }$ G
QT_END_NAMESPACE
4 \! Y; K3 c" w3 C) MQT_END_HEADER$ K) g7 [" z, O1 \2 g$ s
8 L& ~ v6 s7 c. r. ]- I) b
#endif // QT_NO_CONCURRENT& e$ J3 e! f5 K/ [
# g1 w) W2 ^. A/ a
#endif
3 ?1 ~' ~* m/ f* f& m0 q+ ?$ |+ ]) S2 I: E) s) c
|
|