diff options
Diffstat (limited to 'src/corelib/thread/qfuturewatcher.h')
-rw-r--r-- | src/corelib/thread/qfuturewatcher.h | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/src/corelib/thread/qfuturewatcher.h b/src/corelib/thread/qfuturewatcher.h index 8a6716a8f7..fb7dd30499 100644 --- a/src/corelib/thread/qfuturewatcher.h +++ b/src/corelib/thread/qfuturewatcher.h @@ -41,11 +41,10 @@ #define QFUTUREWATCHER_H #include <QtCore/qfuture.h> - -#ifndef QT_NO_QFUTURE - #include <QtCore/qobject.h> +QT_REQUIRE_CONFIG(future); + QT_BEGIN_NAMESPACE @@ -58,7 +57,7 @@ class Q_CORE_EXPORT QFutureWatcherBase : public QObject Q_DECLARE_PRIVATE(QFutureWatcherBase) public: - explicit QFutureWatcherBase(QObject *parent = Q_NULLPTR); + explicit QFutureWatcherBase(QObject *parent = nullptr); // de-inline dtor int progressValue() const; @@ -76,7 +75,7 @@ public: void setPendingResultsLimit(int limit); - bool event(QEvent *event) Q_DECL_OVERRIDE; + bool event(QEvent *event) override; Q_SIGNALS: void started(); @@ -98,8 +97,8 @@ public Q_SLOTS: void togglePaused(); protected: - void connectNotify (const QMetaMethod &signal) Q_DECL_OVERRIDE; - void disconnectNotify (const QMetaMethod &signal) Q_DECL_OVERRIDE; + void connectNotify (const QMetaMethod &signal) override; + void disconnectNotify (const QMetaMethod &signal) override; // called from setFuture() implemented in template sub-classes void connectOutputInterface(); @@ -166,8 +165,8 @@ public Q_SLOTS: private: QFuture<T> m_future; - const QFutureInterfaceBase &futureInterface() const Q_DECL_OVERRIDE { return m_future.d; } - QFutureInterfaceBase &futureInterface() Q_DECL_OVERRIDE { return m_future.d; } + const QFutureInterfaceBase &futureInterface() const override { return m_future.d; } + QFutureInterfaceBase &futureInterface() override { return m_future.d; } }; template <typename T> @@ -185,7 +184,7 @@ template <> class QFutureWatcher<void> : public QFutureWatcherBase { public: - explicit QFutureWatcher(QObject *_parent = Q_NULLPTR) + explicit QFutureWatcher(QObject *_parent = nullptr) : QFutureWatcherBase(_parent) { } ~QFutureWatcher() @@ -197,8 +196,8 @@ public: private: QFuture<void> m_future; - const QFutureInterfaceBase &futureInterface() const Q_DECL_OVERRIDE { return m_future.d; } - QFutureInterfaceBase &futureInterface() Q_DECL_OVERRIDE { return m_future.d; } + const QFutureInterfaceBase &futureInterface() const override { return m_future.d; } + QFutureInterfaceBase &futureInterface() override { return m_future.d; } }; Q_INLINE_TEMPLATE void QFutureWatcher<void>::setFuture(const QFuture<void> &_future) @@ -212,6 +211,5 @@ Q_INLINE_TEMPLATE void QFutureWatcher<void>::setFuture(const QFuture<void> &_fut } QT_END_NAMESPACE -#endif // QT_NO_QFUTURE #endif // QFUTUREWATCHER_H |