|
|
我对syslink进行交叉编译到arm,但是出现如下错误:5 I' A% _& J- f6 }3 c! W+ f
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'# m5 d7 x- @" X) N: i& `2 I
# J) U$ Z4 S; p5 Y这个头文件内容如下:, h+ L# T& j' E. z3 s( @* l+ n0 _
#ifndef QTCONCURRENT_RUNBASE_H5 o8 y. W8 L# O# i) y$ G" X
#define QTCONCURRENT_RUNBASE_H
) [; N5 }7 V2 I7 W. |# d9 s* \0 k; Y: y3 o) O, I [& O2 M0 m; R/ Q
#include <QtCore/qglobal.h>
. D/ C& f0 `" ~& }1 a
9 Y: d1 Q- k% d/ Q, G: O#ifndef QT_NO_CONCURRENT ]+ \- t9 O, c0 s2 W0 V
% v( H6 [& K4 ?* O T; u& x3 L* j#include <QtCore/qfuture.h>
0 W' J0 Z& s9 y5 ?) g#include <QtCore/qrunnable.h>
$ |# y- j+ B( Q! p#include <QtCore/qthreadpool.h>! a, F, ~$ q3 Z7 a
. F7 x3 o* M# h- q1 G& i" U3 t7 rQT_BEGIN_HEADER
' ?; b1 j" g6 l: R' ?QT_BEGIN_NAMESPACE c. r) X) l- `+ y/ P4 k
2 S4 s4 B1 S2 U" T: s5 hQT_MODULE(Core)
6 L+ _1 T3 E4 m7 B7 c- o# W& _' C) O' U- _8 ^
#ifndef qdoc3 i9 z5 ]/ g$ d! ~( j
8 D8 ]/ y/ n8 e9 `
namespace QtConcurrent {! [6 S) L+ s) }* i V
: ^& W1 Y' b1 L! \" g) d t; Atemplate <typename T> H4 [9 T: L3 h3 d0 d5 W/ E
struct SelectSpecialization8 k! y f2 J) @9 L# f
{/ K3 |. i* x* }* }: G( o
template <class Normal, class Void>
8 e2 o# r$ { Z( \" K struct Type { typedef Normal type; }; Y# I3 m8 I* u ~! g
};
' M$ c0 Z7 x- s
9 o% F7 k1 I" D4 _, htemplate <>
. n, a2 L8 a4 U9 z# ^struct SelectSpecialization<void>
# k, v" l, ]9 m" ?2 j{
& V6 H( d6 r N [, f template <class Normal, class Void>+ C7 E5 q* m: a6 |3 {: q4 d
struct Type { typedef Void type; };1 t, G$ u# v0 t3 D* k
};2 V: b2 |; o$ g# g6 c3 @' Z! i
7 j0 p7 w/ |! e+ n$ mtemplate <typename T>- v$ H+ G( ^7 w; F/ W& t1 W
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable& d: C9 U2 e% e
{$ H T( V l1 ?( D0 ]1 Q
public:
# g6 a! Z' m9 n4 Q+ w6 r QFuture<T> start()
$ j. ^$ O7 h5 [, C6 s {. d* |9 O# W. w) m( ^ r& {8 L
this->setRunnable(this);
7 X# G6 u H, p2 a! C2 G% W" i$ w" u this->reportStarted();* e) l. A+ h3 D7 u( ~1 e F4 A
QFuture<T> future = this->future();. J% |( ?# H3 e2 [
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
5 P9 ] \" G6 V1 {% G$ M/ v return future;
0 R6 @9 n$ F& W0 o; n }) n! ^, H& x) u# X. v" ~
8 s5 ^9 d1 u2 i$ r2 e1 H
void run() {}" }* q. t+ P {, @4 J9 D) {
virtual void runFunctor() = 0;
( X" b) U* D8 M- i0 T};
4 m' M6 j' f7 M6 T5 n( r0 w, o& _3 X" k9 K
template <typename T>/ c; f- I0 }' \5 z7 V+ [. _
class RunFunctionTask : public RunFunctionTaskBase<T>, {6 ^: a# V) b+ g$ l) V: R
{# P, ^9 D6 w" ? E6 r! e
public:9 E8 S* [7 c& \% i6 ~) T, ]
void run()* w- c/ o( f% T' j9 B; E1 B) X
{/ i" W- T' j* T4 x5 X
if (this->isCanceled()) {2 c% ?% H# ]5 \! K$ p
this->reportFinished(); Q( p- l0 z; p5 w
return;
x, b$ z) E0 i* e; @ }5 c. B9 \5 s2 |
this->runFunctor();3 P5 n' `& e& m2 a' ^
this->reportResult(result);
( P# Y6 g ?) ~ this->reportFinished();
( x# ~! i( K3 _ }
7 g+ [( m4 o, Z3 A5 @ T result;
1 Q" t, W* B# K4 J};4 o$ Y6 {$ o' d( H# w
# M8 z2 y( X. n, t- S
template <>
% {; J3 m- _5 |& | e+ ~class RunFunctionTask<void> : public RunFunctionTaskBase<void>- b2 I. ~3 F, |0 \
{! ^" ]: K$ p7 k! V
public:
& j# ~5 B( A ^! [ void run()
3 w" R$ @7 K7 h9 u2 ^+ H9 C { @" Q7 }8 y; c/ Z3 {
if (this->isCanceled()) {
# N# @$ {2 E, |( V1 C" B6 m this->reportFinished();: k: M7 c; l# R$ y6 l. ^
return;5 R8 d1 q* j4 x
}4 w. K. z% @& |6 x; `
this->runFunctor();
b4 F$ [: J7 {7 h( M3 O' F this->reportFinished();
( r% O8 k( q/ d. [) A$ b2 H% h( g }8 C1 j! D, c& p D+ y
};
9 }& O7 C( p4 N; ~& Q; C
4 } \6 k; O5 ~0 W9 _6 A} //namespace QtConcurrent
. j0 E2 V4 \( N5 o" J1 {# V
! @# e6 S9 ~9 E7 `& A4 u# i: R( [#endif //qdoc
. w0 t3 h/ k y/ @% ^+ z' L" s, h# X+ {, r9 }
QT_END_NAMESPACE3 }0 o) R2 S& \6 r
QT_END_HEADER
2 |4 W* E* n2 ] |: B8 |7 q4 A! g2 y/ s
#endif // QT_NO_CONCURRENT
" K$ ^/ v& |" W- M
" x/ t3 f3 t c5 r p#endif
, y! h5 g0 z; ~5 z2 |, }" t$ I1 V8 e) d( Z& y
|
|