|
|
我对syslink进行交叉编译到arm,但是出现如下错误:6 q4 P& ~ g d t: b1 o, Z
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter': n7 `+ U, H ~+ e
3 k6 H, N6 W( J+ Q/ E这个头文件内容如下:
* ~0 d5 N- U; { u- W#ifndef QTCONCURRENT_RUNBASE_H
- T/ I2 C- ]1 H; ?/ Q) O#define QTCONCURRENT_RUNBASE_H7 p$ I5 j4 M4 s6 _5 X: a: [: q
7 h4 @ U+ w$ S9 i7 b2 `
#include <QtCore/qglobal.h>. O" T/ T1 L" b/ p
" f3 h6 F9 \9 v! u& ?- c! R
#ifndef QT_NO_CONCURRENT
; d& S+ _: X8 A7 c) N Q9 Q- h* h' ]" C7 w
#include <QtCore/qfuture.h>
2 s8 B) h3 b& {' h" ]' O#include <QtCore/qrunnable.h>7 Q4 M- Y m6 z$ _6 L: q
#include <QtCore/qthreadpool.h>
* {9 S5 A" g! K' x; H1 e% M( H. ~# ^: ~- z: A# x
QT_BEGIN_HEADER
" U3 S( y: i5 e* j! [, gQT_BEGIN_NAMESPACE5 E0 J: n; |. v3 v* L& w
* Z! f; s9 a/ s/ ] q" X
QT_MODULE(Core)* o) R' R4 [! r' q6 D5 P
+ z7 R! b* W8 ^# L4 s1 \
#ifndef qdoc
6 W, X; P! y1 s
2 n+ V [) {! ]1 Qnamespace QtConcurrent {
/ d+ A) j( u/ z& W! K4 Q6 _, q. x, C s# Z
template <typename T>
9 S" T8 z0 d3 x+ Nstruct SelectSpecialization
9 w3 J, h. C9 [, R: F{
" T9 K2 [4 O2 f1 Q4 X template <class Normal, class Void>
1 x, ]' [8 i, s" R4 X. j struct Type { typedef Normal type; };
% P1 c1 S4 b5 P3 \. X};
8 s5 v# L' o* b5 {: _' V& p# ^
( o# U2 n; i& C+ Ytemplate <>
7 P% f( V& X7 B" m# Tstruct SelectSpecialization<void>3 T9 h+ \+ i( w) x( A9 s- Q
{5 x# Q8 D% \' f/ a; k/ y1 d& H% p5 f
template <class Normal, class Void>* \) p+ E% b# w+ V$ i* @
struct Type { typedef Void type; };7 y0 d8 }8 g' Z G" }/ D" D
};
- u0 l7 s, Y# x
- L* R# `8 @3 ^2 b wtemplate <typename T>" n) o; r& s$ k1 E* |& y
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable2 z# S3 ?3 j5 |" m' I+ k' \! ?
{
/ j( p/ W& L |2 j7 Rpublic:1 Z0 h9 x3 S% e
QFuture<T> start() m X9 w! L' `/ |2 E) R0 r
{' Q5 f" h$ ?: c; ^
this->setRunnable(this);
: P! J8 S& l( \# v3 Y9 R this->reportStarted();
* ^* r( y2 u1 g7 }' v QFuture<T> future = this->future();8 m: [/ ?( i4 |( D3 N6 P) d
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);, d% r6 z* I1 |% O' w# E
return future;( e7 y4 ]# _4 v2 q, V, Q
} g5 _7 a+ Y+ h
+ w4 P& K2 j5 D3 T void run() {}
' U% s2 J7 b" z3 Q virtual void runFunctor() = 0;7 t8 K5 Y8 w1 q; l* U
};
" M# [' z$ }8 c) ?8 _9 U. \/ i! C( P( \; q2 H, t
template <typename T>% j8 ` K8 ]2 t, K- o
class RunFunctionTask : public RunFunctionTaskBase<T>0 O; E5 Y1 l' R% A+ M
{1 b' y' L3 n& A9 X. N# N
public:6 w( h2 y2 P# l) h9 K9 u
void run()6 Q* I' q( a$ o3 h0 _# ?: S
{
/ \( n L* F% U! I" N4 w: } if (this->isCanceled()) {
' q0 h* S# h# @ this->reportFinished();9 A V3 S. c+ O) @( v9 t
return;
7 C6 s0 Q0 W% G7 }& K: H }
) Z% S8 ?+ z" u this->runFunctor();
2 q8 L0 n G, L! F. s/ } this->reportResult(result);5 U- ^9 U1 L: A" |/ g R
this->reportFinished();5 p2 T. n% T5 Q# ?# A
}- t% Z7 q' ~$ o% |3 }3 ^8 C. t* K
T result;
9 M% i3 Z2 D; ?7 X5 N: X};
' P+ J2 `+ j9 r
) }8 Y6 J4 k/ \/ t atemplate <>
6 w7 Z; N; W6 F! d7 eclass RunFunctionTask<void> : public RunFunctionTaskBase<void>% j `/ F, ~+ A6 g
{
7 A) s* m2 o8 b8 ]6 D l* \public:/ G$ Y- |" ]0 ] W1 U- L2 d
void run()" t; S* {% v% K/ g0 \* N
{7 ~, o0 A# |) b. {
if (this->isCanceled()) {
- G+ N: l& }( H5 s- g2 f R* d% ]9 V this->reportFinished();
) J+ m- S3 A- c" f g7 ? return;, M3 Y4 C8 E0 Y' H ~* j8 j' A
}+ n* d2 u3 p( N8 X! c
this->runFunctor();
0 J* J, a7 o' i' p- P this->reportFinished();
8 H" s: T0 g4 a1 }& e4 A }/ a3 i. d! x) d7 p" { T
};
$ F1 v% V! z3 d9 a
, J* P9 h ?8 |& A$ q* @' T} //namespace QtConcurrent- W$ R$ I* @5 x0 k) F, S& q
, ]1 b- c: B4 I7 _2 h% A4 t
#endif //qdoc
* U& B5 c: ~- S1 Y% N( X
$ G# C/ ~6 C" S. ?QT_END_NAMESPACE
# P w5 ~0 ]1 W& {0 m' v! Z5 [QT_END_HEADER
/ U" ]. w6 K, u
, ]: X, j1 u* L# E# |/ Q5 J1 l: T$ g#endif // QT_NO_CONCURRENT6 q+ \/ ^ Y+ x9 \8 ]
7 a- N& ?& m( L# i
#endif
+ L$ E; D1 p0 N2 `: ?- {9 x4 ^) ^& e' {9 D6 h3 l1 |
|
|