|
|
我对syslink进行交叉编译到arm,但是出现如下错误:. R7 d$ Q/ |( I2 d
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
5 h/ b9 x/ k2 j0 I; K
3 _4 @7 F9 B0 ~( s0 I这个头文件内容如下:
. m) @9 K: M8 `$ c: {- X#ifndef QTCONCURRENT_RUNBASE_H
4 N) \, \4 a; A#define QTCONCURRENT_RUNBASE_H
" M3 S( m- z; ]
9 H* y# O8 t; i#include <QtCore/qglobal.h>6 I4 D6 W% N4 _6 b' h( J5 P' ]( L3 q
9 n/ Z/ A+ h3 w( T#ifndef QT_NO_CONCURRENT' a# k3 A# M( a2 I& R5 x* {8 g; p
% _8 ^6 J4 s1 n# |( ~7 H x#include <QtCore/qfuture.h>
@1 Z/ J' ^4 O/ ]2 b#include <QtCore/qrunnable.h>' c. p2 u C4 T' \
#include <QtCore/qthreadpool.h> E& Q3 d1 Z! ~, h! e" Q! Z
! G! J! W. X8 HQT_BEGIN_HEADER
+ p4 }* T4 J+ u! sQT_BEGIN_NAMESPACE
7 b8 x D/ d, \ g/ I6 |- b
5 i s9 [5 s [( n! qQT_MODULE(Core)
* @( Z$ {1 Y, H) S. @' Z6 H
+ Y! h) B$ b. t" [+ _#ifndef qdoc3 [0 \3 x3 D, t& a! I# P7 ~
4 x' F7 T! l& G( E6 V
namespace QtConcurrent {
5 Q' N$ u6 \: ?: n( G# U" D, y" o6 Z j! o. G6 H1 _
template <typename T>6 L. f1 n. {; e) d4 z! f
struct SelectSpecialization
; O7 f1 v" D5 L& v7 h& m* s{' ?# G* p7 S6 g: G r# X3 }
template <class Normal, class Void>
; f l5 ?# C3 E" J struct Type { typedef Normal type; };
\" e# v- p. T0 `$ X E" w};
/ d: n3 u ? s, B' T1 t* b$ a( X! H
template <>7 v* j3 d9 x/ H" ?* `4 z
struct SelectSpecialization<void>
8 M" d5 I; V+ G4 F7 }8 x* @{
; c% c* a* D$ F- W% @ template <class Normal, class Void>
8 C( I5 Z% d# m+ d& G2 s, Z struct Type { typedef Void type; };" {8 c; ~7 }% A& D4 \) }$ P
};
# E& Q4 M9 d! ~* e
: i7 U/ [* I6 J. U0 gtemplate <typename T>
! k% A7 A* A/ u/ d5 @) e1 jclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
6 f7 O* s+ n$ O+ U+ \{3 Y( Y7 |& t. u5 w. F
public:
/ m# z( J6 g i QFuture<T> start()
+ |% H; d+ P6 Y0 |5 T {
% x( D. M$ `8 l' n+ Z this->setRunnable(this);
, a. ?+ @/ r$ U, ]7 ` this->reportStarted();
$ U/ f% ^1 {- e9 J QFuture<T> future = this->future();
4 A' z5 F8 Z0 k7 p7 U! h x3 | QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);; \$ [) p; A9 B* N" t
return future;
5 v; [6 ]; h$ Y( F }
* R8 m4 C$ {* F0 d. r1 X( K3 C/ h/ c- X* F9 M
void run() {}2 _5 K( f' P) k$ L+ T+ d
virtual void runFunctor() = 0;
; n5 A6 R2 u# S1 U};- z: r6 p' x0 Y; N
) `+ E% r, ~" w8 F5 w
template <typename T>
6 |) U; T7 W) A7 x( n3 }2 Q0 u" Q0 hclass RunFunctionTask : public RunFunctionTaskBase<T>8 ~9 |9 w4 ^9 G/ @) T
{: `. _/ D( {- R1 o3 Q, K9 H
public:
7 K: d- G4 j! R* |1 n void run()' g+ K+ P5 y" w: E7 O" N
{
& K7 w. ]! f( A" z$ e if (this->isCanceled()) {
5 F. `0 ~7 r2 u O# u8 {" f this->reportFinished();
$ f! ?9 E8 `+ I3 `) i0 { return;- ]( g2 ^9 i# V, n8 P: b
}
* S5 X( `0 a0 U) t& w5 E; S) _8 l this->runFunctor();
* B/ C( n, B1 G* F- p this->reportResult(result);/ z! Q" I& a" j' [
this->reportFinished();
, V# f. a. r) N9 d; { }! Y0 C1 }( n$ ^' D9 a
T result;
& w/ k4 n2 D+ |; c% V# x};: x# S6 r/ @, H' y3 ~+ O
+ a$ X! i6 v" [" n5 [) D) |
template <>' X- q' {9 o; m! ~1 R/ P, b
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
6 _+ i7 J; r/ Z5 ]{" ~7 X0 t6 c5 I5 R& d
public:6 e `5 t1 T5 u. N& d8 O
void run()
# X1 U! j4 G; u0 A {/ w: g' N L& v2 ~ h8 ^, E
if (this->isCanceled()) {- p- H, _* L1 h! d# O+ ?
this->reportFinished();
1 e" ^5 y, B0 w9 I( x+ l+ y- j return;6 Y7 ^0 e% ~$ x! @( d/ h( _
}
, R$ [1 g; g$ J this->runFunctor();
5 ?3 [! q1 {; {; c- ^6 N( O# f this->reportFinished();; Y+ p# N/ r9 p- ]
}4 s- N/ e3 m5 o" n+ Z! [
};
- g) c/ b4 ` _# ~% I+ u5 X7 t( z3 ^( c. I- I9 ^" G
} //namespace QtConcurrent
+ e6 U! Y, z1 P% p
" d( T+ Q) j* ~ H#endif //qdoc
5 T& L5 s1 \+ g1 B* i0 {) T" _1 E% |; w
QT_END_NAMESPACE4 S' q; s0 X0 S. c
QT_END_HEADER
* N+ @, ]& ~7 s$ ~. P0 g4 b
# X6 o" A0 l8 T" z) H$ W#endif // QT_NO_CONCURRENT
+ N! S' ]3 b9 H; ^) S6 S5 o
7 H* t9 \: w. e6 b5 B0 l#endif" [$ m( |2 ^! O$ l- S. b
1 H7 t$ q3 I& `, r/ p
|
|