|
|
我对syslink进行交叉编译到arm,但是出现如下错误:; }1 @% y9 m+ I _
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
0 S: w/ y" I4 b* ?
6 q6 k8 b" n0 c1 H这个头文件内容如下:
" ]. g1 Z2 w8 v+ D$ Q7 n3 o#ifndef QTCONCURRENT_RUNBASE_H7 j( K* z0 }( H
#define QTCONCURRENT_RUNBASE_H, x, a, r: R4 k' b
$ U9 T8 m- v7 Y0 k! B#include <QtCore/qglobal.h>, a- F3 b4 D2 ]2 @8 F
5 H6 \; i f* A( z% V
#ifndef QT_NO_CONCURRENT2 g: I7 O- U$ a1 [7 L( @3 G# g
( ?0 o/ L5 G, @; B& Y#include <QtCore/qfuture.h>
' {$ d* L* c |+ g) w+ i#include <QtCore/qrunnable.h>2 J2 i7 p( n# R# @3 K, V0 @
#include <QtCore/qthreadpool.h>
4 O. H& Q) i& V9 A, s( P# x0 x: f# C- F0 ]' H) u* E
QT_BEGIN_HEADER5 P0 i) O) _0 e3 P+ T
QT_BEGIN_NAMESPACE
, a; S: T0 k- \, {- Z+ X
4 I& [" o& Q1 E' B/ cQT_MODULE(Core)) b1 g: C- Q1 _: J6 E
! e* q1 K, z& @% k" @" a
#ifndef qdoc8 T% o8 G% H8 s+ z5 C
/ `& i) j0 f# l& p0 @( x6 V$ Mnamespace QtConcurrent {
) [# ^7 f) V, f! G4 \2 Y0 T: S8 m! r* C# i' {& X
template <typename T>
! E5 Y/ ^& m# w6 O8 @struct SelectSpecialization
$ G+ u o3 Z) {! V8 X{
- Q5 m3 C- ~8 L9 P template <class Normal, class Void>
& z. }- M+ N. A9 @3 B$ f" { struct Type { typedef Normal type; };
4 Q+ P, j- ]/ Q$ O7 C};, B5 g9 v2 M, S9 I! ~1 V) c; T
4 B: z0 O c( Y& ~& d% E; Y
template <>& k! L% ^! z9 R5 h# M
struct SelectSpecialization<void> a- \. x) V) P1 p) `- J
{
! |. X, P/ y& \- Z template <class Normal, class Void>! A; _9 f$ M; C+ X1 }7 w
struct Type { typedef Void type; };5 `; j# r; `$ t# |
};+ B6 Q$ S% P) d7 n8 u2 H
6 s9 j6 J" V- y; d$ }/ f2 Gtemplate <typename T>
. U* Z. P5 \% B9 ^& Z$ s0 Y5 Wclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable' h6 @. F7 u, |* z, |$ m
{
& K4 D) Y+ V% q: F" D: xpublic:
8 g9 h, z' e( E QFuture<T> start()
& c/ v; D. r7 C5 B {' B+ w6 K4 `! G5 e0 `. t
this->setRunnable(this);! l! u( q4 p" z' s- f
this->reportStarted();
0 D: d6 ^' _9 y7 E+ b7 k- n QFuture<T> future = this->future();2 D1 P0 ?7 c. @$ m% s
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
+ a0 V4 ]. W J1 h return future;
W& M+ ~: N: d# ]. K* h: | }: W. E) ^; B: Z1 N6 ]1 l
4 @" I. z0 q- Y/ ?! g void run() {}# a) N7 T/ ^1 I: P9 p1 ^+ j1 M9 O
virtual void runFunctor() = 0;
' n O3 R. P6 J# J+ G, @- k8 ?0 U};" x) Y0 p- R8 d9 g9 ?6 {
0 C! U1 s2 r8 _: s/ m. k0 I! o
template <typename T>) z4 d! Q7 G% ^ n2 T$ W4 Q. y
class RunFunctionTask : public RunFunctionTaskBase<T>
; K8 R( {" s/ y5 o3 i7 G! D# t* H6 T{
2 V; F+ _" p! E$ i y- P8 gpublic:
' U$ c7 O& P# A( i8 \& p( l( m void run() A ^0 e* u: L& R. K1 e- z
{
6 v! I0 @! W* v+ A" a5 R if (this->isCanceled()) {
( }6 @/ ]; w( s' [5 P! N5 ` this->reportFinished();
9 G" _) n+ ]! c% i% q return;5 W) ~$ X2 S; M. \' J }7 ]* \
}- [( x8 T8 N! D5 X4 H3 H; {
this->runFunctor();7 \5 O1 f. g/ t* M/ e3 e' E7 t
this->reportResult(result);
. r4 f n) i! `% k9 J this->reportFinished();' S/ D- @" E0 _9 ^8 C6 _
}
! q( w$ R C5 `, d6 J6 s0 ]& L T result;1 A p$ F Q+ ~* y1 I9 @
};
) S( `: A% x) o
9 [# s$ f/ c' M4 q, @template <>
q+ x4 `+ D I) _9 C# m( aclass RunFunctionTask<void> : public RunFunctionTaskBase<void>& A8 z3 |! s/ Y% X
{
* B0 g/ [% k0 j1 t: o' I o6 lpublic:& G9 l" M, y6 a+ A6 ^* R" O
void run()9 _5 F P/ ~ k) ]% p
{4 D1 z, X# J" w
if (this->isCanceled()) {9 a# C+ d4 m& Y: a; a
this->reportFinished();
& L( w8 W1 H* v$ g return;) T( p/ M* l- V: n) \6 y- A
}
, I9 U) g! W7 Z# O% }9 Y& d this->runFunctor();% m) c8 o8 @$ r( @) a Z$ M+ C
this->reportFinished();' l: Z! c: Z6 p9 q* V! m
}
( q2 d+ K, c0 H6 t/ ]2 D6 g2 C};
* @& l3 C# j3 L P/ h
3 R+ X x7 F: M+ I& |* P6 _) Z/ W% ^} //namespace QtConcurrent
; u `1 ]# X% T# [
/ U5 u8 x( n' e2 |4 n! e1 a#endif //qdoc' P' p; M3 f4 t; N. F) J5 B
- v+ e* i& J6 I: O+ _5 yQT_END_NAMESPACE
4 S6 Z) G, Q0 A! f6 O! u, m$ l- Q0 mQT_END_HEADER% Y& ?3 a: Y5 _
, V Z+ m: v0 z1 I#endif // QT_NO_CONCURRENT( P( t/ {$ p. I6 `
: w$ y' w+ k8 `; `: k#endif
" e1 O/ O4 V9 e/ Q1 G, S y
; u# O) _9 B7 c- Q2 u1 J( ]5 L |
|