summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2013-01-08 12:31:26 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-27 00:25:09 (GMT)
commit58355a22d424ae079dea9899bb127426724ca370 (patch)
treea51a31796d777738dd57c80b17fc2321eb684be0 /src/corelib
parent40c3f4a5a567a536cd1cbf3ab089da52627650df (diff)
downloadQt-58355a22d424ae079dea9899bb127426724ca370.zip
Qt-58355a22d424ae079dea9899bb127426724ca370.tar.gz
Qt-58355a22d424ae079dea9899bb127426724ca370.tar.bz2
Fix compilation of Qt Concurrent with gcc 4.3
GCC 4.3 had support for decltype but not the new function syntax (which we call "auto function" for short). That meant the code did not compile. qtconcurrentrun.h:105: error: expected initializer before ‘->’ token Task-number: QTBUG-28984 Change-Id: I792276ec59c4f6e73f6137c517636e70c71ed849 (cherry-picked from Qt 5 commit 0c4f6c6ea9415bcc5fde3e34bf909f43a9c6483c) Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/concurrent/qtconcurrentrun.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/concurrent/qtconcurrentrun.h b/src/corelib/concurrent/qtconcurrentrun.h
index 5362f26..fa8c0cc 100644
--- a/src/corelib/concurrent/qtconcurrentrun.h
+++ b/src/corelib/concurrent/qtconcurrentrun.h
@@ -99,7 +99,7 @@ QFuture<T> run(T (*functionPointer)(Param1, Param2, Param3, Param4, Param5), con
return (new StoredFunctorCall5<T, T (*)(Param1, Param2, Param3, Param4, Param5), Arg1, Arg2, Arg3, Arg4, Arg5>(functionPointer, arg1, arg2, arg3, arg4, arg5))->start();
}
-#ifdef Q_COMPILER_DECLTYPE
+#if defined(Q_COMPILER_DECLTYPE) && defined(Q_COMPILER_AUTO_FUNCTION)
template <typename Functor>
auto run(Functor functor) -> typename QtPrivate::QEnableIf<!QtPrivate::HasResultType<Functor>::Value, QFuture<decltype(functor())> >::Type