QAbstractEventDispatcherV2: clean up override keywords
Virtual functions should have exactly one of 'virtual', 'override' or
'final', because 'final' implies 'override' and 'override' implies
'virtual' (CppCoreGuidelines C.128;
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rh-override).
So add 'override' to the dtor and remove 'virtual override' from the
final functions.
Amends af6afad3b3.
Change-Id: I65711c4ca87d522fc0d3afc994f8812914eab7d3
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e6dab10c32b2d57e8f47e5c16827a3c1560f2e27)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
bb10
parent
fbfec48c42
commit
ac05ee3746
|
|
@ -100,7 +100,7 @@ class Q_CORE_EXPORT QAbstractEventDispatcherV2 : public QAbstractEventDispatcher
|
|||
|
||||
public:
|
||||
explicit QAbstractEventDispatcherV2(QObject *parent = nullptr);
|
||||
~QAbstractEventDispatcherV2();
|
||||
~QAbstractEventDispatcherV2() override;
|
||||
|
||||
// new virtuals
|
||||
virtual void registerTimer(Qt::TimerId timerId, Duration interval, Qt::TimerType timerType,
|
||||
|
|
@ -115,12 +115,11 @@ protected:
|
|||
|
||||
private:
|
||||
// final overrides from V1
|
||||
virtual void registerTimer(int timerId, qint64 interval, Qt::TimerType timerType,
|
||||
QObject *object) override final;
|
||||
virtual bool unregisterTimer(int timerId) override final;
|
||||
virtual QList<TimerInfo> registeredTimers(QObject *object) const override final;
|
||||
|
||||
virtual int remainingTime(int timerId) override final;
|
||||
void registerTimer(int timerId, qint64 interval, Qt::TimerType timerType,
|
||||
QObject *object) final;
|
||||
bool unregisterTimer(int timerId) final;
|
||||
QList<TimerInfo> registeredTimers(QObject *object) const final;
|
||||
int remainingTime(int timerId) final;
|
||||
};
|
||||
#else
|
||||
using QAbstractEventDispatcherV2 = QAbstractEventDispatcher;
|
||||
|
|
|
|||
Loading…
Reference in New Issue