OSDN Git Service

fix and merge QT_NO_QFUTURE with QT_NO_CONCURRENT
authorIvailo Monev <xakepa10@gmail.com>
Fri, 25 Feb 2022 23:39:59 +0000 (01:39 +0200)
committerIvailo Monev <xakepa10@gmail.com>
Fri, 25 Feb 2022 23:39:59 +0000 (01:39 +0200)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/core/concurrent/qfuture.h
src/core/concurrent/qfutureinterface.cpp
src/core/concurrent/qfutureinterface.h
src/core/concurrent/qfuturewatcher.cpp
src/core/concurrent/qfuturewatcher.h
src/core/concurrent/qfuturewatcher_p.h
src/core/concurrent/qtconcurrentexception.cpp
src/core/concurrent/qtconcurrentexception.h
src/core/concurrent/qtconcurrentresultstore.cpp
src/core/concurrent/qtconcurrentresultstore.h
src/core/global/qconfig.h.cmake

index 89a2169..9c6c65d 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <QtCore/qglobal.h>
 
-#ifndef QT_NO_QFUTURE
+#ifndef QT_NO_CONCURRENT
 
 #include <QtCore/qfutureinterface.h>
 #include <QtCore/qstring.h>
index 671095b..51f0829 100644 (file)
@@ -22,7 +22,7 @@
 // qfutureinterface.h included from qfuture.h
 #include "qfuture.h"
 
-#ifndef QT_NO_QFUTURE
+#ifndef QT_NO_CONCURRENT
 
 #include <QtCore/qatomic.h>
 #include <QtCore/qthread.h>
index a663b2a..29790e0 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <QtCore/qrunnable.h>
 
-#ifndef QT_NO_QFUTURE
+#ifndef QT_NO_CONCURRENT
 
 #include <QtCore/qmutex.h>
 #include <QtCore/qtconcurrentexception.h>
index f91913f..3fe5bab 100644 (file)
 
 #include "qfuturewatcher.h"
 
-#ifndef QT_NO_QFUTURE
-#  include <QtCore/qcoreevent.h>
-#  include <QtCore/qcoreapplication.h>
-#  include <QtCore/qthread.h>
-#  include "qfuturewatcher_p.h"
-#endif
+#ifndef QT_NO_CONCURRENT
 
-QT_BEGIN_NAMESPACE
+#include <QtCore/qcoreevent.h>
+#include <QtCore/qcoreapplication.h>
+#include <QtCore/qthread.h>
+#include "qfuturewatcher_p.h"
 
-#ifndef QT_NO_QFUTURE
+QT_BEGIN_NAMESPACE
 
 /*! \class QFutureWatcher
     \reentrant
@@ -576,11 +574,16 @@ void QFutureWatcherBasePrivate::sendCallOutEvent(QFutureCallOutEvent *event)
 
 */
 
-#else
+QT_END_NAMESPACE
+
+#include "moc_qfuturewatcher.h"
 
-// On Symbian winscw target QT_NO_QFUTURE and QT_NO_CONCURRENT are both defined.
-// However moc will be run without having them set, so provide a dummy stub at
-// least for the slots to prevent linker errors.
+#else // QT_NO_CONCURRENT
+
+// moc will be run without having QT_NO_CONCURRENT set, so provide a dummy stub
+// for the slots to prevent linker errors.
+
+QT_BEGIN_NAMESPACE
 
 void QFutureWatcherBase::cancel() { }
 void QFutureWatcherBase::setPaused(bool) { }
@@ -591,8 +594,6 @@ bool QFutureWatcherBase::event(QEvent *) { return false; }
 void QFutureWatcherBase::connectNotify(const char *) { }
 void QFutureWatcherBase::disconnectNotify(const char *) { }
 
-#endif // QT_NO_QFUTURE
-
 QT_END_NAMESPACE
 
-#include "moc_qfuturewatcher.h"
+#endif // QT_NO_CONCURRENT
index bf375f5..aa0f4ad 100644 (file)
 #include <QtCore/qfuture.h>
 #include <QtCore/qobject.h>
 
-QT_BEGIN_NAMESPACE
+#ifndef QT_NO_CONCURRENT
 
+QT_BEGIN_NAMESPACE
 
 class QEvent;
-
 class QFutureWatcherBasePrivate;
-
-#ifdef QT_NO_QFUTURE
 class QFutureInterfaceBase;
-#endif
 
 class Q_CORE_EXPORT QFutureWatcherBase : public QObject
 {
@@ -94,8 +91,6 @@ private:
     virtual QFutureInterfaceBase &futureInterface() = 0;
 };
 
-#ifndef QT_NO_QFUTURE
-
 template <typename T>
 class QFutureWatcher : public QFutureWatcherBase
 {
@@ -161,8 +156,8 @@ Q_INLINE_TEMPLATE void QFutureWatcher<void>::setFuture(const QFuture<void> &_fut
     connectOutputInterface();
 }
 
-#endif // QT_NO_QFUTURE
-
 QT_END_NAMESPACE
 
+#endif // QT_NO_CONCURRENT
+
 #endif // QFUTUREWATCHER_H
index 57f7fab..a78bc6d 100644 (file)
@@ -36,7 +36,7 @@
 #include "qfutureinterface_p.h"
 #include "qlist.h"
 
-#ifndef QT_NO_QFUTURE
+#ifndef QT_NO_CONCURRENT
 
 #include "qobject_p.h"
 
@@ -66,5 +66,6 @@ public:
 
 QT_END_NAMESPACE
 
-#endif // QT_NO_QFUTURE
-#endif
+#endif // QT_NO_CONCURRENT
+
+#endif // QFUTUREWATCHER_P_H
index 96f10d9..0736236 100644 (file)
@@ -21,7 +21,8 @@
 
 #include "qtconcurrentexception.h"
 
-#ifndef QT_NO_QFUTURE
+#ifndef QT_NO_CONCURRENT
+
 #ifndef QT_NO_EXCEPTIONS
 
 QT_BEGIN_NAMESPACE
@@ -191,4 +192,5 @@ bool ExceptionStore::hasThrown() const { return exceptionHolder.base->hasThrown;
 QT_END_NAMESPACE
 
 #endif // QT_NO_EXCEPTIONS
+
 #endif // QT_NO_CONCURRENT
index 8ac369b..3a63902 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <QtCore/qglobal.h>
 
-#ifndef QT_NO_QFUTURE
+#ifndef QT_NO_CONCURRENT
 
 #include <QtCore/qatomic.h>
 
@@ -102,4 +102,4 @@ QT_END_NAMESPACE
 
 #endif // QT_NO_CONCURRENT
 
-#endif
+#endif // QTCONCURRENT_EXCEPTION_H
index 286eccc..8e786ef 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "qtconcurrentresultstore.h"
 
-#ifndef QT_NO_QFUTURE
+#ifndef QT_NO_CONCURRENT
 
 QT_BEGIN_NAMESPACE
 
index 30ee617..8d5b801 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <QtCore/qglobal.h>
 
-#ifndef QT_NO_QFUTURE
+#ifndef QT_NO_CONCURRENT
 
 #include <QtCore/qmap.h>
 #include <QtCore/qvector.h>
@@ -213,4 +213,4 @@ QT_END_NAMESPACE
 
 #endif // QT_NO_CONCURRENT
 
-#endif
+#endif // QTCONCURRENT_RESULTSTORE_H
index cb58e64..b029be0 100644 (file)
 // #cmakedefine QT_NO_MESSAGEBOX
 // #cmakedefine QT_NO_PROGRESSBAR
 // #cmakedefine QT_NO_PROPERTIES
+// #cmakedefine QT_NO_PROXYMODEL
 
 // Misc
 #cmakedefine QT_NO_USING_NAMESPACE
 #cmakedefine QT_NO_PRINTPREVIEWDIALOG
 #cmakedefine QT_NO_PRINTPREVIEWWIDGET
 #cmakedefine QT_NO_PROGRESSDIALOG
-#cmakedefine QT_NO_PROXYMODEL
 #cmakedefine QT_NO_QFUTURE
 #cmakedefine QT_NO_QUATERNION
 #cmakedefine QT_NO_QUUID_STRING
 #  define QT_NO_DEBUG_STREAM
 #endif
 
-// Future
-#if !defined(QT_NO_QFUTURE) && defined(QT_NO_CONCURRENT)
-#  define QT_NO_QFUTURE
-#endif
-
 // Animation
 #if !defined(QT_NO_ANIMATION) && defined(QT_NO_PROPERTIES)
 #  define QT_NO_ANIMATION