|
|
我对syslink进行交叉编译到arm,但是出现如下错误:1 r! K7 U6 o F" Y& y
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'* a9 B& l9 I1 d# V9 G" X
: y- O2 G% v7 ]$ w5 T这个头文件内容如下:7 @ @1 R w; }2 m2 h
#ifndef QTCONCURRENT_RUNBASE_H
3 |7 ^: e* W& y. b#define QTCONCURRENT_RUNBASE_H
3 [; q$ G) i% D0 Y5 J
. e& b. P) o% c#include <QtCore/qglobal.h>
c. ?( I7 P' d% P. d2 l) v7 R* ]. o$ J; v$ k
#ifndef QT_NO_CONCURRENT& ?1 l/ ]; r+ H+ z
- h4 q( D5 R4 i. y) q#include <QtCore/qfuture.h>2 Y" \# @5 t0 i& ]) P/ |/ O
#include <QtCore/qrunnable.h>
$ G4 a6 ]* k3 G1 E) V, p* M#include <QtCore/qthreadpool.h>1 x$ E1 B: {2 K
4 A( q) Z, x3 p& ~
QT_BEGIN_HEADER
: p5 F/ k7 A5 {+ C: R- W" ZQT_BEGIN_NAMESPACE
& t3 y2 ^7 I6 J9 O% ]# g: [
- I- m% n! c! m( W: l3 JQT_MODULE(Core)
; w- n0 \3 A; I2 X. r$ F: _ x* ]$ b: C1 ~ M9 K' }1 |' J/ R
#ifndef qdoc
. J6 q7 h3 {1 [& I& ]: {! o, g% G( O
namespace QtConcurrent {
; e8 h6 @* L1 |$ b, _7 C1 P
G* u. G; [% x$ _7 M( ?template <typename T>( {9 q: Q' b2 S% u6 B6 T2 ^3 G
struct SelectSpecialization
6 s J% s2 n1 X, k2 W0 y7 N{
6 z. z* R% r; G2 s template <class Normal, class Void>" ?* n3 T7 A! r! s- D* L6 @/ {
struct Type { typedef Normal type; };
. q2 ^8 j+ R, T9 f* w7 m; W( c};9 k3 D+ H: f' d( z
' w0 a; A$ Z" Y4 l l# s
template <>
* F+ H+ F$ B. Ystruct SelectSpecialization<void>$ o/ s7 s1 o0 Q, L# M9 s1 [
{
# D J) Y0 n0 f; ]/ a8 N l. { template <class Normal, class Void>% Z0 G3 A/ t1 L7 C" V% M7 {
struct Type { typedef Void type; };. i6 W5 [; p! a( G5 D
};
7 t6 J0 {/ i+ u5 |- p% Q# V1 B- g: B, L! k0 a2 {! o3 X
template <typename T>1 c$ N( d1 j2 R8 X$ g, y( d6 \
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable% P/ K! Q& r4 q& c; }; Y
{
' b6 S6 u/ |0 P. N1 e1 ipublic:! m: P" [: _; o) N
QFuture<T> start()7 v2 K" b6 q8 O6 I+ ~# t. f+ ?
{
. q( I$ F8 R, j" R+ V3 }9 G& n this->setRunnable(this);
) N% ]1 M" J! T/ U; O, R( ^ this->reportStarted();/ L+ t3 O# m' F$ F9 j# Z C' k0 w
QFuture<T> future = this->future();! s' s; b \. J3 I0 g
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);4 P) a. G% U/ K
return future;+ {; i4 I" a! d+ |/ @4 t
}
; h+ a2 k' n O; r0 `% M3 n; \9 \1 a$ ?' E9 e3 n/ x8 ^
void run() {}0 x! |3 i( s' i. ~( H0 |; }( A
virtual void runFunctor() = 0;
1 c$ n/ `# |- z: P};
$ f+ b; c5 e: D
5 I. K4 P: B* f# Ctemplate <typename T>
, V' e# f. D; }5 W+ Q5 F5 |/ zclass RunFunctionTask : public RunFunctionTaskBase<T>( r& o8 v) |& K: _. s: s, }! T% }
{
2 D# p9 @# L7 K2 N; A9 c- Ipublic:
& V/ q* `4 x( w4 ? void run(): @2 U7 ^0 \' D w( }* ^' A- ~( U
{
0 W& ?) \3 |5 v. r: k+ C if (this->isCanceled()) {
8 m8 f4 n% }! x* v: f2 Q$ t this->reportFinished();; {4 `" `2 Z9 I0 V
return;
3 ~ U4 {- F( n* y% Q! g" g }( x. _3 [ a4 S/ L
this->runFunctor();6 v/ d! G% A1 T. Y9 U* s) D
this->reportResult(result);/ o4 b7 P8 [0 ?' X# F) e
this->reportFinished();
3 f7 Z$ \3 r) S8 Q! u- r }
) ~6 v- U$ ~0 |6 w7 m* b T result;
3 l* [9 I1 {2 z* \" I7 T};
( f! [2 k3 l1 M( g
5 ^, {2 j" r! X a4 V2 E& @template <>: v4 Z5 p! Q P( i
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
N* C( i5 s1 G{+ {: F9 x3 K4 R
public:8 n3 O- `3 l: }3 v4 e
void run()
8 x3 @/ l. X6 z" { {
' Q$ W' w7 |6 _1 G if (this->isCanceled()) {% w/ d& Z X0 d; s- z6 V8 F
this->reportFinished();
8 i6 B8 [* x0 a* y) Z0 y return;% N, a& e3 w6 V1 S3 M- u
}2 Z v' w4 H0 N: w
this->runFunctor();" c/ w! b! ?. W7 ~3 Y$ z
this->reportFinished();
! R" r3 W1 t! l. Q }1 M( U6 v! I& K5 E: k0 `* t
}; g: }. v/ f0 C2 ^9 x* l! n$ M( F6 |
. |6 I9 Y! `' }% j2 O5 u
} //namespace QtConcurrent( k, }, [; ]7 P5 C) z6 Y, P
! g$ ]5 D8 x [/ s$ i `: N#endif //qdoc
- ]( C3 d0 g* W. l1 T E2 D4 s) e" W& N/ v6 |
QT_END_NAMESPACE
( M3 U$ w( j5 D' `; DQT_END_HEADER
. y; C$ Q4 B, ^, \! ~& i1 ?
5 ?$ [+ }8 G. q# f. ^1 Z8 i#endif // QT_NO_CONCURRENT
, ?( [$ V6 Q8 o y: w/ ~* A# C
0 X5 o9 {$ b+ d% M#endif! W2 f" D* e; k& |
1 J% ~* t. m7 ]' Z8 ^ |
|