|
我对syslink进行交叉编译到arm,但是出现如下错误:, F: ]: ^* S( Z2 {
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
4 P( v& J5 I2 o
3 X: G: u' y8 {+ |1 n这个头文件内容如下:
& z' U% `4 M' F6 @#ifndef QTCONCURRENT_RUNBASE_H+ U3 W; Y4 J% L& w- J
#define QTCONCURRENT_RUNBASE_H
- a. l! ^$ ^) e, `8 @) S6 X1 V7 { b" f/ E5 j5 |2 \8 r! `$ i
#include <QtCore/qglobal.h>2 |1 {. a8 [$ X4 c) B% ~+ V9 i" B7 Z
( f( H- @7 Q; [: [0 |#ifndef QT_NO_CONCURRENT" _; A& e) m+ f9 i9 _2 x# W
}3 H$ {# j9 l0 J9 G! O
#include <QtCore/qfuture.h>: T% Z( C5 j( H6 b
#include <QtCore/qrunnable.h>7 T8 y; S2 S( e% T
#include <QtCore/qthreadpool.h>0 Q; u6 I2 ~0 _8 `+ ^8 L+ N9 f& O; S
4 f& ~; v4 M5 f r7 JQT_BEGIN_HEADER) {) n/ ^7 D. S; d
QT_BEGIN_NAMESPACE
+ b2 M) H/ y4 A/ J- l j- z( q8 n3 J7 ~. l' q; }
QT_MODULE(Core)9 Z$ I6 U, D7 F
1 B q0 L9 w5 ~5 D9 g% `$ _#ifndef qdoc
- I/ X; b" k2 A8 q
$ n: k. B( F/ g( s' D0 S- ~) ynamespace QtConcurrent {6 y5 ~: T9 t5 V$ t/ \7 \# h
7 Q( Z% E* ~4 N
template <typename T>+ K) k' v: X, Y7 x5 u
struct SelectSpecialization
; U" h8 `* O' y8 _" ?% O3 ^" b, S{
- w, E, V9 w% g5 G( p$ W2 G template <class Normal, class Void># d! G7 Q! |; S! ~+ k# [
struct Type { typedef Normal type; };
5 Z ]5 G! C% Y% H% f' ^0 {};
$ n/ B6 F3 R6 j* t; W' s6 O" \6 o% {% D5 ~5 r2 W6 U
template <>% K: A: Q. s$ G# M/ a) n* D
struct SelectSpecialization<void>5 K. X, }/ x$ ^& s. M+ J
{6 T9 q: B- a- f
template <class Normal, class Void>
# a+ ^& T8 j# e% _1 J* R3 U! y/ f, s struct Type { typedef Void type; };7 m r$ e* Y) ?1 l7 C; s- C
};
8 ^# C3 F O. O/ i4 L/ z) j/ e6 T
5 J$ A c0 [1 \! p+ Stemplate <typename T>$ ^- l9 J* e' `5 ~
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable0 {/ V- m( Y% ^+ v# _) i4 _
{* r3 i- B* f& u2 S1 H$ ~% K6 C
public:9 Y7 u8 B1 U! S1 n" x! u
QFuture<T> start()
8 A4 |. V, R, Z9 k; k6 c% W5 w! V {
% Y0 J% M& v( b$ W X( l; c this->setRunnable(this);
/ C" i9 g& x! |% O this->reportStarted();) j7 D$ ?5 o! h. ~; O0 j
QFuture<T> future = this->future();
& D& m9 d! J6 h+ ~& z QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
& s6 c! g9 Z" {* J5 w return future;
: \& o5 V& Q3 ^% H }/ t# s) f! d1 ]* r; D
; k; r1 z9 o) h: Q void run() {}
P; x! N' q4 j# @ virtual void runFunctor() = 0;
3 U9 D& {* [4 V/ \* }# o};, W0 \! q- R: z6 ?" c4 Q0 {- m( A) f
" R8 Y4 |8 a. B9 k6 i: X- G# Btemplate <typename T>0 Z. y* I, T% Z: k/ q: a
class RunFunctionTask : public RunFunctionTaskBase<T>) e1 ]1 r1 Q) N/ w8 y( Z
{
1 E, p4 L, |, A0 |public:
/ ]1 ^* O6 @1 G0 V6 }% L void run()
$ t0 I4 S3 t2 z* n- v {1 W; C% d4 S4 G2 i' ^2 e9 S
if (this->isCanceled()) {2 u6 f. ~) z9 c8 M3 s8 _( j" Z
this->reportFinished();
. }3 j, ~# K1 B6 Z$ u& M# I return;" ^' y) b1 B: o- [7 e! P: |: l
}
! D5 ~7 }1 {/ ?" Z$ } this->runFunctor();) k' A7 P% M5 J, [) r
this->reportResult(result);) R4 e, ?( `. E$ k
this->reportFinished();
$ y) j- L5 a8 z }
9 l+ y( i. r- x# Q: r9 k T result;; n3 j1 I* J! G, D2 G' x
};- m; P5 E, t- L" P
( a# y! e0 V7 ~template <>
- F! x# A; |8 C* Wclass RunFunctionTask<void> : public RunFunctionTaskBase<void>
8 \( m, |' v4 l! k. \, T, w{1 V# ?! ~# J6 n- U# d: \
public:+ L) {' l% I# E2 l
void run()
. P. Y9 n4 f% J( m* F, C {- i% t; K/ U" T6 f: T r6 e7 x9 U
if (this->isCanceled()) {% t) O7 f5 E' F6 y; Q# ~7 q$ i
this->reportFinished();' K# _8 t" w8 X# p: p- ?
return;
8 u: r8 O9 d8 C a5 s }8 }$ Q3 N: O4 ]% [8 T
this->runFunctor();
, |, O9 D4 v% e6 k9 @1 t6 { this->reportFinished();
/ a b9 ^ f' C3 D3 S1 f. }2 f. Z }$ Z% ^0 Y4 T- ?6 v1 E- w9 R f
};2 w1 y5 q# F! ]
" ]( g/ m5 ?* s3 N} //namespace QtConcurrent
- A! T( g9 T% ~: g$ Z1 |. ~6 R; a& A! r$ F) `
#endif //qdoc
1 E9 F7 n; z0 z( O$ D, b+ {
: I! L8 h. n9 @+ yQT_END_NAMESPACE( B8 d7 G' R5 q, g* u
QT_END_HEADER+ E1 s# x. c- k: J. k4 n, D5 U1 {
L* Q' M3 `5 h$ y. J: q
#endif // QT_NO_CONCURRENT
, h7 l6 C6 \; v+ l/ u3 _
0 m$ C* L" h- Y. B8 u9 K#endif3 p+ }4 j+ }9 z c7 F
: k/ D% p. W& `0 ~, a# \0 G3 _ |
|