From 5180f32c5abe01acd65cde68c2c16aedda4028ec Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Sun, 16 Nov 2014 13:09:01 +0100 Subject: Add Q_DECL_OVERRIDE in the src subdirectory Done automatically with clang-modernize on linux (But does not add Q_DECL_OVERRIDE to the function that are marked as inline because it a compilation error with MSVC2010) Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171 Reviewed-by: Thiago Macieira --- src/corelib/thread/qexception.h | 4 ++-- src/corelib/thread/qfuturewatcher.h | 14 +++++++------- src/corelib/thread/qfuturewatcher_p.h | 4 ++-- src/corelib/thread/qthread.h | 2 +- src/corelib/thread/qthread_p.h | 2 +- src/corelib/thread/qthreadpool.cpp | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src/corelib/thread') diff --git a/src/corelib/thread/qexception.h b/src/corelib/thread/qexception.h index 6c48b94a88..a1c3bbeb27 100644 --- a/src/corelib/thread/qexception.h +++ b/src/corelib/thread/qexception.h @@ -60,8 +60,8 @@ public: class Q_CORE_EXPORT QUnhandledException : public QException { public: - void raise() const; - QUnhandledException *clone() const; + void raise() const Q_DECL_OVERRIDE; + QUnhandledException *clone() const Q_DECL_OVERRIDE; }; namespace QtPrivate { diff --git a/src/corelib/thread/qfuturewatcher.h b/src/corelib/thread/qfuturewatcher.h index 3ea4c4df4f..f84af0507a 100644 --- a/src/corelib/thread/qfuturewatcher.h +++ b/src/corelib/thread/qfuturewatcher.h @@ -70,7 +70,7 @@ public: void setPendingResultsLimit(int limit); - bool event(QEvent *event); + bool event(QEvent *event) Q_DECL_OVERRIDE; Q_SIGNALS: void started(); @@ -92,8 +92,8 @@ public Q_SLOTS: void togglePaused(); protected: - void connectNotify (const QMetaMethod &signal); - void disconnectNotify (const QMetaMethod &signal); + void connectNotify (const QMetaMethod &signal) Q_DECL_OVERRIDE; + void disconnectNotify (const QMetaMethod &signal) Q_DECL_OVERRIDE; // called from setFuture() implemented in template sub-classes void connectOutputInterface(); @@ -160,8 +160,8 @@ public Q_SLOTS: private: QFuture m_future; - const QFutureInterfaceBase &futureInterface() const { return m_future.d; } - QFutureInterfaceBase &futureInterface() { return m_future.d; } + const QFutureInterfaceBase &futureInterface() const Q_DECL_OVERRIDE { return m_future.d; } + QFutureInterfaceBase &futureInterface() Q_DECL_OVERRIDE { return m_future.d; } }; template @@ -191,8 +191,8 @@ public: private: QFuture m_future; - const QFutureInterfaceBase &futureInterface() const { return m_future.d; } - QFutureInterfaceBase &futureInterface() { return m_future.d; } + const QFutureInterfaceBase &futureInterface() const Q_DECL_OVERRIDE { return m_future.d; } + QFutureInterfaceBase &futureInterface() Q_DECL_OVERRIDE { return m_future.d; } }; Q_INLINE_TEMPLATE void QFutureWatcher::setFuture(const QFuture &_future) diff --git a/src/corelib/thread/qfuturewatcher_p.h b/src/corelib/thread/qfuturewatcher_p.h index 226642119a..84c608d1e0 100644 --- a/src/corelib/thread/qfuturewatcher_p.h +++ b/src/corelib/thread/qfuturewatcher_p.h @@ -63,8 +63,8 @@ class QFutureWatcherBasePrivate : public QObjectPrivate, public: QFutureWatcherBasePrivate(); - void postCallOutEvent(const QFutureCallOutEvent &callOutEvent); - void callOutInterfaceDisconnected(); + void postCallOutEvent(const QFutureCallOutEvent &callOutEvent) Q_DECL_OVERRIDE; + void callOutInterfaceDisconnected() Q_DECL_OVERRIDE; void sendCallOutEvent(QFutureCallOutEvent *event); diff --git a/src/corelib/thread/qthread.h b/src/corelib/thread/qthread.h index 1d32580670..f9df407f72 100644 --- a/src/corelib/thread/qthread.h +++ b/src/corelib/thread/qthread.h @@ -89,7 +89,7 @@ public: QAbstractEventDispatcher *eventDispatcher() const; void setEventDispatcher(QAbstractEventDispatcher *eventDispatcher); - bool event(QEvent *event); + bool event(QEvent *event) Q_DECL_OVERRIDE; public Q_SLOTS: void start(Priority = InheritPriority); diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h index 83693921be..9c67ce4471 100644 --- a/src/corelib/thread/qthread_p.h +++ b/src/corelib/thread/qthread_p.h @@ -305,7 +305,7 @@ public: void init(); private: - void run(); + void run() Q_DECL_OVERRIDE; }; QT_END_NAMESPACE diff --git a/src/corelib/thread/qthreadpool.cpp b/src/corelib/thread/qthreadpool.cpp index c2a8bb0595..2a7cb8d66b 100644 --- a/src/corelib/thread/qthreadpool.cpp +++ b/src/corelib/thread/qthreadpool.cpp @@ -50,7 +50,7 @@ class QThreadPoolThread : public QThread { public: QThreadPoolThread(QThreadPoolPrivate *manager); - void run(); + void run() Q_DECL_OVERRIDE; void registerThreadInactive(); QWaitCondition runnableReady; -- cgit v1.2.3