|
|
我对syslink进行交叉编译到arm,但是出现如下错误:5 h% S A- J8 s7 {
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
& U8 M: U& P/ G5 U+ u" m, F* i5 a
这个头文件内容如下:: k7 ?6 X9 i, w+ u/ q$ }5 F: W+ B8 p
#ifndef QTCONCURRENT_RUNBASE_H
4 H* q# v& i) ]#define QTCONCURRENT_RUNBASE_H
% F6 z: X& N7 f5 e4 ~, C* s& D' z' P% U' E1 l" k1 X
#include <QtCore/qglobal.h>: N& ]( M3 y+ h" p5 u
2 d% h+ z& d5 G2 Q3 X% I
#ifndef QT_NO_CONCURRENT
/ z n6 F1 f- J) s; M* E
+ ^6 D5 \5 }4 f- H/ }4 N9 y% N#include <QtCore/qfuture.h>" G5 L% |; A8 v9 g4 j
#include <QtCore/qrunnable.h>) R' E( x4 R5 n8 f# }. J
#include <QtCore/qthreadpool.h>7 g# y+ O5 O/ P* l' z
6 m) ^) ^9 n7 K% \: P0 q5 v) M+ c
QT_BEGIN_HEADER3 k* {8 @# D2 s$ A1 Q. ?
QT_BEGIN_NAMESPACE6 `7 ~5 M7 |0 [! V/ j
# S5 i4 n0 O% `' L
QT_MODULE(Core) ^9 c) t8 Y& o) @9 f4 b
( Y( y! \: {4 k; m; U% n- S# S- M#ifndef qdoc0 m) x* D% Y7 w+ z3 J. N4 ]
' ?3 G8 }/ u& ?1 h8 jnamespace QtConcurrent {
5 A* C/ S3 {+ G* {9 N; A
% `0 d7 ~2 ?7 I! N# ttemplate <typename T>
3 ]9 S9 T5 o' m( K4 o. g" Jstruct SelectSpecialization7 D" E9 x8 b' M: ?; e
{
. ]) V; ~0 ~% V/ J$ ] template <class Normal, class Void>
r5 ~' `3 W2 ~- ^/ Q2 f. u# X struct Type { typedef Normal type; };
" S' J4 y: k5 g$ I# {: `};& A# F- q8 I+ n; L+ ]
& O5 A @% `: E8 _/ v* mtemplate <>
$ B2 r$ F; T" q# J% \( Lstruct SelectSpecialization<void>, z/ [* `3 ?; w5 e4 o8 w+ M
{9 M$ t+ I/ V6 ~& A' P
template <class Normal, class Void>$ v5 ?. t z' Y6 I
struct Type { typedef Void type; };
1 F, [! Q/ ?( Y};) \3 U, }" M# L% y
" X" o& C$ O$ i. V" Q
template <typename T>
3 Y, L2 `' V; B% Y5 V8 i/ \class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
# `7 w ]" u3 g& A; B5 H{
. q- t- F; V$ {* U# Ipublic:( l: @: T$ q5 s, ]1 E. d
QFuture<T> start()- j9 D3 v, S; d' i$ B
{' Z* x2 h. {# W& Z
this->setRunnable(this); @2 h& ]$ w' H# Y% O0 z
this->reportStarted();
1 e3 F' Z% g7 Z9 |4 d7 Z/ | QFuture<T> future = this->future();( `; _ @7 k7 D. c
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
0 f3 s5 E( T" ~6 p7 b+ \) V( g return future;
0 p0 U) l# U. |5 @- z }/ \0 B0 N, y4 @4 j
% U0 H0 m: q# @/ f, \
void run() {}* d1 m# Z% E6 [4 X7 P1 S- V: O
virtual void runFunctor() = 0;
! l9 f4 T( \0 ~3 P! c4 R};
2 w/ q0 q7 C$ d: Z3 P2 \6 e; X2 u# U2 h
template <typename T>
0 Y7 t- D7 c6 T4 n- g! h0 V( uclass RunFunctionTask : public RunFunctionTaskBase<T>0 u' r0 |0 Y( b
{; l& u) n* a8 r
public:
0 d% K9 h" i* t/ D) d5 U void run()
0 U$ @: K9 P7 } D$ c* ^0 B {
, X) ?% W" t2 Q if (this->isCanceled()) {, h, R: @. q. T* O% K K5 i0 p
this->reportFinished();
& v2 u; |5 n/ Y) b% i return;
2 R1 G3 b. H% r( o) r; V1 U6 P+ j }
5 A/ ?3 M) F* k6 w! l this->runFunctor();
/ J2 N* g6 |# I( |6 y this->reportResult(result);' Y0 U/ `; T! Z; |
this->reportFinished();
: [6 s/ J3 V7 F, d }5 {8 n1 g+ t. c$ S1 M5 G4 h4 q
T result;
& Z+ q! Y3 u' F. s- c0 l* W& P3 E};4 {- J: z y/ V; G0 F' X
# Z& d% q1 }8 F2 o+ ztemplate <>' [, _* W/ Y9 w6 W8 D9 E5 E' B
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
7 B# T* T& m% W' t{4 `3 o% h8 k& r# n# [7 k
public:
/ P8 R* w) j3 {" a void run()/ C, t# ?" H+ `
{/ `5 @ d/ R+ ~* q4 v# O7 s$ i
if (this->isCanceled()) {
2 O: `4 m& Y: V4 {2 b2 r* R this->reportFinished();8 ?" w5 _- [0 m$ d) K! R
return;7 X: {$ s; U d* |5 ~
}0 O5 d% u4 U1 ]. K
this->runFunctor();
! k7 `% L* U! L! {8 [& n! j this->reportFinished();
; T, b; {& C6 S% Z \6 t }2 f" |" C# u4 ~; S9 s
};5 m" ?6 s2 s; S4 _5 `% [7 l7 ?( ?
6 A; e0 r, e% ^* ^/ t6 {} //namespace QtConcurrent
, f" u& l8 h6 M
+ x8 d! P7 {2 V* P4 f6 L- V#endif //qdoc; M+ E# s( G3 R: K4 W
9 c) H0 q/ L8 U/ z, LQT_END_NAMESPACE
1 `" L( T6 F4 H8 |2 O& MQT_END_HEADER
0 l: S1 Q/ x& f8 o8 _+ ?
& ?# V: q$ Y5 U2 A* S#endif // QT_NO_CONCURRENT
9 A/ S* A1 Q1 G/ h7 j3 Q1 ^- @+ R( J) U/ [" N" v7 G
#endif
% b, j, n) ]- G/ h0 H' Z+ l8 Q c
|
|