summaryrefslogtreecommitdiffstats
path: root/src/corelib/concurrent/qfuturewatcher.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-05-12 12:16:45 +0200
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-05-12 12:16:45 +0200
commit455440996f659ae246536b7450ba9b7900d015d0 (patch)
treea2d26dbd78bc33643693fb10132d3fee64af5ed9 /src/corelib/concurrent/qfuturewatcher.h
parentd7d9a14de00f9391ab0be953357d24713f580675 (diff)
Disable QtConcurrent for Symbian winscw builds.
While QtConcurrent is nowadays usable with RVCT and GCCE compilers, the compiler used for the winscw target has problems with the templates still. To enable building 4.8 on winscw, the patch defines QT_NO_CONCURRENT and QT_NO_QFUTURE in qglobal.h for this target. However this causes further complications in the Q_OBJECT classes of QtConcurrent because moc will be run without having QT_NO_CONCURRENT and QFUTURE defined (as moc is not a Symbian app and for other Symbian targets they must not be defined, which makes differentiation in qglobal.h impossible for the moc run) and having a moc file generated for a class that will be ifdef'ed out during compilation causes build breaks. Therefore additional dummy stubs are provided in QFutureWatcherBase. Reviewed-by: Liang Qi
Diffstat (limited to 'src/corelib/concurrent/qfuturewatcher.h')
-rw-r--r--src/corelib/concurrent/qfuturewatcher.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/corelib/concurrent/qfuturewatcher.h b/src/corelib/concurrent/qfuturewatcher.h
index 5fe2007a01..26e549d200 100644
--- a/src/corelib/concurrent/qfuturewatcher.h
+++ b/src/corelib/concurrent/qfuturewatcher.h
@@ -44,8 +44,6 @@
#include <QtCore/qfuture.h>
-#ifndef QT_NO_QFUTURE
-
#include <QtCore/qobject.h>
QT_BEGIN_HEADER
@@ -56,6 +54,11 @@ QT_MODULE(Core)
class QEvent;
class QFutureWatcherBasePrivate;
+
+#ifdef QT_NO_QFUTURE
+class QFutureInterfaceBase;
+#endif
+
class Q_CORE_EXPORT QFutureWatcherBase : public QObject
{
Q_OBJECT
@@ -114,6 +117,8 @@ private:
virtual QFutureInterfaceBase &futureInterface() = 0;
};
+#ifndef QT_NO_QFUTURE
+
template <typename T>
class QFutureWatcher : public QFutureWatcherBase
{
@@ -214,9 +219,9 @@ Q_INLINE_TEMPLATE void QFutureWatcher<void>::setFuture(const QFuture<void> &_fut
connectOutputInterface();
}
+#endif // QT_NO_QFUTURE
+
QT_END_NAMESPACE
QT_END_HEADER
-#endif // QT_NO_CONCURRENT
-
#endif // QFUTUREWATCHER_H