|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
+ w$ X/ m$ D7 n: ~) \/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'( q4 S( l1 g0 {5 p2 k/ w
X6 }7 Z; _6 {0 c; U& f
这个头文件内容如下:2 F* G7 i; m$ t+ Q+ N
#ifndef QTCONCURRENT_RUNBASE_H* \! w$ r# @0 R% z
#define QTCONCURRENT_RUNBASE_H B U( e! |+ `4 o4 j! y
6 x5 J L$ Y) W3 [/ p( A
#include <QtCore/qglobal.h>
1 o' Q5 N7 Y$ b6 d4 i! u% K6 K) Z6 z3 q6 C H% k
#ifndef QT_NO_CONCURRENT) H+ }! `( ]+ O. { M; W
& x' q( t0 X" B, ?' ^
#include <QtCore/qfuture.h>
- \* J6 P; z- f6 r' i. r1 W#include <QtCore/qrunnable.h>! N" u& P- M5 B4 V4 S3 t! b6 C+ S
#include <QtCore/qthreadpool.h>
" q% i5 ^7 A4 g$ f" _0 B
4 a9 L8 x4 K; [" ~- O$ T3 JQT_BEGIN_HEADER
6 k6 P8 e" M! O# k- `% \4 p5 [QT_BEGIN_NAMESPACE6 k( H( G9 @5 b( q, Y/ c* V
1 z9 P, w: U, C. cQT_MODULE(Core)5 I$ d3 {2 S% b6 F# u' k+ P; m
! b$ s, l. m: C- D* Z0 ^0 F
#ifndef qdoc
V g# h) @, k7 w# e2 X4 r0 J( [' _0 J
namespace QtConcurrent {
4 g3 i! @, Z& y+ E' A: m
2 g5 |# E* N+ M: d$ E! i5 qtemplate <typename T>6 G! M; _$ j1 h V
struct SelectSpecialization5 g G( d' |% b2 P
{9 k5 p3 C% M8 h
template <class Normal, class Void>/ s7 M! ^2 S- H& X4 Y
struct Type { typedef Normal type; };
% c+ T% z# K4 t- z6 o, G};
. o( r' `0 Y/ n( P( \3 Q+ n: p6 s+ d. c& s/ O
template <>/ O9 N# Z: n9 B/ Q0 N" Z# l) f
struct SelectSpecialization<void>$ D' E9 \% a4 u% _# N; C1 |
{
; M8 g6 D t3 l' @5 i+ Q6 m$ a template <class Normal, class Void>
5 P/ y* G9 V, ~7 [" G1 j struct Type { typedef Void type; };6 t9 _% m; x b
};
1 G, Z1 }' b. D$ z+ |5 ?6 C, H5 h: V: `' o/ b+ A; U, j" Y
template <typename T> e$ [ `& }) _; [; h- \
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
. O3 _% _1 Z1 X# @{
7 ]3 B" w2 c: g% Zpublic:8 L3 X; J/ Q! ]% Q4 V4 d
QFuture<T> start()- X$ i* m" E! t2 @- R: m4 V
{5 L5 {( i) i/ U. \
this->setRunnable(this);9 v# d9 N6 S8 s, J
this->reportStarted();; x4 ~: b; s% X9 f+ ~: o/ Q% H
QFuture<T> future = this->future();! y `# n: P* s4 p" |
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
1 F( C8 W: ^( Q1 Z! b/ Z- k6 V return future;
5 V" |6 E2 {$ \5 A- N {4 }, C }
- {3 T6 X( \# ?8 U% m; V: _5 w9 N
6 p$ ~$ l" Y: A, `% M void run() {}
7 h5 {' u* C; u9 t" s virtual void runFunctor() = 0;
0 c; J, ?6 w9 J H7 a$ T, d};
( e! i6 `1 I4 J4 N
5 x+ ^* ^ p% S2 h) e. P" i& |template <typename T>
, f( s" o& B: Hclass RunFunctionTask : public RunFunctionTaskBase<T>0 y. k/ T* [4 `5 P/ t- A& i5 D
{
2 u- Z3 ?" K' L1 f+ ~% Zpublic:% F) x6 H* r& j e
void run()
7 y0 H: Y& L! @: T5 Y {+ [6 b8 J! p) r4 U& C
if (this->isCanceled()) {" P+ K# n7 R0 v' c0 F; P
this->reportFinished();2 B' k4 C! G9 a6 |4 w& r8 i4 n7 |
return;
/ P6 L; a* J/ c ~% x }
. h/ e$ C0 ]) b this->runFunctor();5 u0 k1 K* {! j! ]* C
this->reportResult(result);* \% [+ a$ H( i7 \
this->reportFinished();- c9 F* h4 V& w$ j
}2 D4 _; T9 h4 F% I
T result;
- t2 F7 I6 @) v% Z};$ n5 K9 M: ~3 E7 c
3 x4 ^9 p7 G, r, Q9 t' T1 v# ptemplate <>! r& d; e$ E. V- ^- W5 _
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
3 R5 x$ d+ j8 p$ _& O{
" d9 E* Q% ?# t& U2 j! Rpublic:
! ?; u% e8 {4 p& N& U void run()6 z- x4 d8 n$ o: m# v) P/ r( Q
{
& J6 s- `6 E8 N+ e& F4 e6 [, @ if (this->isCanceled()) {
7 ~- J0 l; H9 Q this->reportFinished();3 w$ H8 j9 Y h1 r: T( H% w6 G% u
return;
7 ?6 Y: a0 f. i6 I& A1 x" i }
* u$ p' F7 S6 a this->runFunctor();6 j+ H5 b4 S6 w( ^. X' [
this->reportFinished();
, {; D6 ~. U1 p6 q }
- m2 c: |/ L* y! z, j};2 c3 ]5 P5 z& F
+ N) W+ \% @" G7 K; l} //namespace QtConcurrent
0 A3 k! w' {$ g" }3 O& X; C) N* `" L) X7 h6 w& |$ z3 f4 L) Y& s7 E6 L8 ~
#endif //qdoc
% M Z% ?0 Y+ h; \ X
3 a7 u4 } q" |, jQT_END_NAMESPACE
" F; Y, w+ ?- x1 LQT_END_HEADER
- _% @) V* o- f5 Z: [0 S! J; L6 {9 K, Z$ x. b
#endif // QT_NO_CONCURRENT
( k2 x4 p* I% y( P, I8 i( ?: T3 Z
0 H( s) B$ V8 T: n2 C/ |) V#endif
5 }7 q1 G9 Z1 }& r
5 b+ r' R p! K( q6 w) s+ ] |
|