diff options
21 files changed, 24 insertions, 33 deletions
diff --git a/src/concurrent/concurrent.pro b/src/concurrent/concurrent.pro index d21dff91dd..8fdd6d8cd2 100644 --- a/src/concurrent/concurrent.pro +++ b/src/concurrent/concurrent.pro @@ -12,8 +12,6 @@ load(qt_module) PRECOMPILED_HEADER = ../corelib/global/qt_pch.h SOURCES += \ - qfuture.cpp \ - qfutureinterface.cpp \ qfuturesynchronizer.cpp \ qfuturewatcher.cpp \ qtconcurrentfilter.cpp \ @@ -23,8 +21,6 @@ SOURCES += \ HEADERS += \ qtconcurrent_global.h \ - qfuture.h \ - qfutureinterface.h \ qfuturesynchronizer.h \ qfuturewatcher.h \ qtconcurrentcompilertest.h \ @@ -44,7 +40,6 @@ HEADERS += \ # private headers HEADERS += \ - qfutureinterface_p.h \ qfuturewatcher_p.h QMAKE_DOCS = $$PWD/doc/qtconcurrent.qdocconf diff --git a/src/concurrent/qfuturesynchronizer.h b/src/concurrent/qfuturesynchronizer.h index 9e003c0fa9..b82e968d8f 100644 --- a/src/concurrent/qfuturesynchronizer.h +++ b/src/concurrent/qfuturesynchronizer.h @@ -44,7 +44,7 @@ #include <QtConcurrent/qtconcurrent_global.h> -#include <QtConcurrent/qfuture.h> +#include <QtCore/qfuture.h> #ifndef QT_NO_CONCURRENT diff --git a/src/concurrent/qfuturewatcher.h b/src/concurrent/qfuturewatcher.h index 4cee31b5ef..a08f418d01 100644 --- a/src/concurrent/qfuturewatcher.h +++ b/src/concurrent/qfuturewatcher.h @@ -44,7 +44,7 @@ #include <QtConcurrent/qtconcurrent_global.h> -#include <QtConcurrent/qfuture.h> +#include <QtCore/qfuture.h> #ifndef QT_NO_QFUTURE diff --git a/src/concurrent/qfuturewatcher_p.h b/src/concurrent/qfuturewatcher_p.h index 2092084b86..23d9472cd7 100644 --- a/src/concurrent/qfuturewatcher_p.h +++ b/src/concurrent/qfuturewatcher_p.h @@ -55,7 +55,7 @@ #include <QtConcurrent/qtconcurrent_global.h> -#include "qfutureinterface_p.h" +#include <private/qfutureinterface_p.h> #include <qlist.h> #ifndef QT_NO_QFUTURE diff --git a/src/concurrent/qtconcurrent_global.h b/src/concurrent/qtconcurrent_global.h index 54e70b67f8..464aa88d49 100644 --- a/src/concurrent/qtconcurrent_global.h +++ b/src/concurrent/qtconcurrent_global.h @@ -47,10 +47,6 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -#ifdef QT_NO_CONCURRENT -# define QT_NO_QFUTURE -#endif - #ifndef QT_STATIC # if defined(QT_BUILD_CONCURRENT_LIB) # define Q_CONCURRENT_EXPORT Q_DECL_EXPORT diff --git a/src/concurrent/qtconcurrentrunbase.h b/src/concurrent/qtconcurrentrunbase.h index 897345f239..6c67338d25 100644 --- a/src/concurrent/qtconcurrentrunbase.h +++ b/src/concurrent/qtconcurrentrunbase.h @@ -46,7 +46,7 @@ #ifndef QT_NO_CONCURRENT -#include <QtConcurrent/qfuture.h> +#include <QtCore/qfuture.h> #include <QtCore/qrunnable.h> #include <QtCore/qthreadpool.h> diff --git a/src/concurrent/qtconcurrentthreadengine.h b/src/concurrent/qtconcurrentthreadengine.h index 2a5187502f..ee3f7e6bd6 100644 --- a/src/concurrent/qtconcurrentthreadengine.h +++ b/src/concurrent/qtconcurrentthreadengine.h @@ -47,7 +47,7 @@ #ifndef QT_NO_CONCURRENT #include <QtCore/qthreadpool.h> -#include <QtConcurrent/qfuture.h> +#include <QtCore/qfuture.h> #include <QtCore/qdebug.h> #include <QtCore/qexception.h> #include <QtCore/qwaitcondition.h> diff --git a/src/concurrent/doc/snippets/code/src_concurrent_qfuture.cpp b/src/corelib/doc/snippets/code/src_corelib_thread_qfuture.cpp index 16c9d0b162..16c9d0b162 100644 --- a/src/concurrent/doc/snippets/code/src_concurrent_qfuture.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_thread_qfuture.cpp diff --git a/src/concurrent/qfuture.h b/src/corelib/thread/qfuture.h index 3a9fd64bb8..8b16f308f2 100644 --- a/src/concurrent/qfuture.h +++ b/src/corelib/thread/qfuture.h @@ -42,11 +42,11 @@ #ifndef QFUTURE_H #define QFUTURE_H -#include <QtConcurrent/qtconcurrent_global.h> +#include <QtCore/qglobal.h> #ifndef QT_NO_QFUTURE -#include <QtConcurrent/qfutureinterface.h> +#include <QtCore/qfutureinterface.h> #include <QtCore/qstring.h> QT_BEGIN_HEADER diff --git a/src/concurrent/qfuture.cpp b/src/corelib/thread/qfuture.qdoc index 0316366e6e..91414a092a 100644 --- a/src/concurrent/qfuture.cpp +++ b/src/corelib/thread/qfuture.qdoc @@ -374,7 +374,7 @@ QFuture::constBegin() or QFuture::constEnd() before you start iterating. Here's a typical loop that prints all the results available in a future: - \snippet code/src_concurrent_qfuture.cpp 0 + \snippet code/src_corelib_thread_qfuture.cpp 0 \sa QFutureIterator, QFuture */ @@ -555,7 +555,7 @@ list (i.e. before the first result). Here's how to iterate over all the results sequentially: - \snippet code/src_concurrent_qfuture.cpp 1 + \snippet code/src_corelib_thread_qfuture.cpp 1 The next() function returns the next result (waiting for it to become available, if necessary) from the future and advances the iterator. Unlike @@ -570,7 +570,7 @@ Here's how to iterate over the elements in reverse order: - \snippet code/src_concurrent_qfuture.cpp 2 + \snippet code/src_corelib_thread_qfuture.cpp 2 If you want to find all occurrences of a particular value, use findNext() or findPrevious() in a loop. diff --git a/src/concurrent/qfutureinterface.cpp b/src/corelib/thread/qfutureinterface.cpp index 2c33418ee9..ce9eb143d7 100644 --- a/src/concurrent/qfutureinterface.cpp +++ b/src/corelib/thread/qfutureinterface.cpp @@ -562,4 +562,4 @@ void QFutureInterfaceBasePrivate::setState(QFutureInterfaceBase::State newState) QT_END_NAMESPACE -#endif // QT_NO_CONCURRENT +#endif // QT_NO_QFUTURE diff --git a/src/concurrent/qfutureinterface.h b/src/corelib/thread/qfutureinterface.h index e9d8d37b67..b7bf779412 100644 --- a/src/concurrent/qfutureinterface.h +++ b/src/corelib/thread/qfutureinterface.h @@ -42,8 +42,6 @@ #ifndef QFUTUREINTERFACE_H #define QFUTUREINTERFACE_H -#include <QtConcurrent/qtconcurrent_global.h> - #include <QtCore/qrunnable.h> #ifndef QT_NO_QFUTURE @@ -61,7 +59,7 @@ class QFutureInterfaceBasePrivate; class QFutureWatcherBase; class QFutureWatcherBasePrivate; -class Q_CONCURRENT_EXPORT QFutureInterfaceBase +class Q_CORE_EXPORT QFutureInterfaceBase { public: enum State { @@ -308,6 +306,6 @@ public: QT_END_NAMESPACE QT_END_HEADER -#endif // QT_NO_CONCURRENT +#endif // QT_NO_QFUTURE #endif // QFUTUREINTERFACE_H diff --git a/src/concurrent/qfutureinterface_p.h b/src/corelib/thread/qfutureinterface_p.h index 7fd2ea4d99..4498cdfc4b 100644 --- a/src/concurrent/qfutureinterface_p.h +++ b/src/corelib/thread/qfutureinterface_p.h @@ -53,8 +53,6 @@ // We mean it. // -#include <QtConcurrent/qtconcurrent_global.h> - #include <QtCore/qelapsedtimer.h> #include <QtCore/qcoreevent.h> #include <QtCore/qlist.h> @@ -126,7 +124,7 @@ public: virtual void callOutInterfaceDisconnected() = 0; }; -class QFutureInterfaceBasePrivate +class Q_CORE_EXPORT QFutureInterfaceBasePrivate // ### temporary { public: QFutureInterfaceBasePrivate(QFutureInterfaceBase::State initialState); diff --git a/src/corelib/thread/thread.pri b/src/corelib/thread/thread.pri index d9468cc3a4..1accffcdfe 100644 --- a/src/corelib/thread/thread.pri +++ b/src/corelib/thread/thread.pri @@ -12,6 +12,8 @@ HEADERS += thread/qmutex.h \ thread/qatomic.h \ thread/qexception.h \ thread/qresultstore.h \ + thread/qfuture.h \ + thread/qfutureinterface.h \ thread/qbasicatomic.h \ thread/qgenericatomic.h \ thread/qoldbasicatomic.h @@ -19,6 +21,7 @@ HEADERS += thread/qmutex.h \ # private headers HEADERS += thread/qmutex_p.h \ thread/qmutexpool_p.h \ + thread/qfutureinterface_p.h \ thread/qorderedmutexlocker_p.h \ thread/qreadwritelock_p.h \ thread/qthread_p.h \ @@ -27,6 +30,7 @@ HEADERS += thread/qmutex_p.h \ SOURCES += thread/qatomic.cpp \ thread/qexception.cpp \ thread/qresultstore.cpp \ + thread/qfutureinterface.cpp \ thread/qmutex.cpp \ thread/qreadwritelock.cpp \ thread/qrunnable.cpp \ diff --git a/tests/auto/concurrent/concurrent.pro b/tests/auto/concurrent/concurrent.pro index c87ae9e673..80d19d30ec 100644 --- a/tests/auto/concurrent/concurrent.pro +++ b/tests/auto/concurrent/concurrent.pro @@ -1,6 +1,5 @@ TEMPLATE=subdirs SUBDIRS=\ - qfuture \ qfuturesynchronizer \ qfuturewatcher \ qtconcurrentfilter \ diff --git a/tests/auto/concurrent/qfuturesynchronizer/tst_qfuturesynchronizer.cpp b/tests/auto/concurrent/qfuturesynchronizer/tst_qfuturesynchronizer.cpp index dbf957c85b..5d643a47f1 100644 --- a/tests/auto/concurrent/qfuturesynchronizer/tst_qfuturesynchronizer.cpp +++ b/tests/auto/concurrent/qfuturesynchronizer/tst_qfuturesynchronizer.cpp @@ -42,7 +42,7 @@ #include <QtTest> #include <QtConcurrent/qfuturesynchronizer.h> -#include <QtConcurrent/qfuture.h> +#include <QtCore/qfuture.h> class tst_QFutureSynchronizer : public QObject { diff --git a/tests/auto/concurrent/qfuturewatcher/qfuturewatcher.pro b/tests/auto/concurrent/qfuturewatcher/qfuturewatcher.pro index fbe577670f..17c0363ce4 100644 --- a/tests/auto/concurrent/qfuturewatcher/qfuturewatcher.pro +++ b/tests/auto/concurrent/qfuturewatcher/qfuturewatcher.pro @@ -1,5 +1,5 @@ CONFIG += testcase parallel_test TARGET = tst_qfuturewatcher -QT = core concurrent-private testlib concurrent +QT = core core-private testlib concurrent SOURCES = tst_qfuturewatcher.cpp DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/concurrent/qfuture/.gitignore b/tests/auto/corelib/thread/qfuture/.gitignore index 77c055c874..77c055c874 100644 --- a/tests/auto/concurrent/qfuture/.gitignore +++ b/tests/auto/corelib/thread/qfuture/.gitignore diff --git a/tests/auto/concurrent/qfuture/qfuture.pro b/tests/auto/corelib/thread/qfuture/qfuture.pro index 794bcfd6d7..36853de2f0 100644 --- a/tests/auto/concurrent/qfuture/qfuture.pro +++ b/tests/auto/corelib/thread/qfuture/qfuture.pro @@ -1,6 +1,6 @@ CONFIG += testcase parallel_test TARGET = tst_qfuture -QT = core concurrent-private testlib concurrent +QT = core core-private testlib concurrent SOURCES = tst_qfuture.cpp DEFINES += QT_STRICT_ITERATORS DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/concurrent/qfuture/tst_qfuture.cpp b/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp index ebf545f128..81ba1b0fd9 100644 --- a/tests/auto/concurrent/qfuture/tst_qfuture.cpp +++ b/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp @@ -1297,8 +1297,8 @@ QFuture<int> createExceptionResultFuture() class DerivedException : public QException { public: - void raise() const { throw *this; } - DerivedException *clone() const { return new DerivedException(*this); } + void raise() const Q_DECL_OVERRIDE { throw *this; } + DerivedException *clone() const Q_DECL_OVERRIDE { return new DerivedException(*this); } }; QFuture<void> createDerivedExceptionFuture() diff --git a/tests/auto/corelib/thread/thread.pro b/tests/auto/corelib/thread/thread.pro index 8f063ee746..0d3f442542 100644 --- a/tests/auto/corelib/thread/thread.pro +++ b/tests/auto/corelib/thread/thread.pro @@ -3,6 +3,7 @@ SUBDIRS=\ qatomicint \ qatomicpointer \ qresultstore \ + qfuture \ qmutex \ qmutexlocker \ qreadlocker \ |