From e17c89f4ce74e5699ed50dc2187a39d8990316c4 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Mon, 26 Feb 2018 17:34:27 +0100 Subject: use the override keyword consistently and correctly (clang-tidy) Change-Id: If9e28d143f8cba3df3c757476b4f2265e2eb8b2a Reviewed-by: Johan Helsing --- examples/qml/networkaccessmanagerfactory/main.cpp | 2 +- examples/qml/qmlextensionplugins/plugin.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/qml') diff --git a/examples/qml/networkaccessmanagerfactory/main.cpp b/examples/qml/networkaccessmanagerfactory/main.cpp index 76d487e029..95dfb5990d 100644 --- a/examples/qml/networkaccessmanagerfactory/main.cpp +++ b/examples/qml/networkaccessmanagerfactory/main.cpp @@ -74,7 +74,7 @@ static int proxyPort = 0; class MyNetworkAccessManagerFactory : public QQmlNetworkAccessManagerFactory { public: - virtual QNetworkAccessManager *create(QObject *parent); + QNetworkAccessManager *create(QObject *parent) override; }; QNetworkAccessManager *MyNetworkAccessManagerFactory::create(QObject *parent) diff --git a/examples/qml/qmlextensionplugins/plugin.cpp b/examples/qml/qmlextensionplugins/plugin.cpp index 3ef7f04f95..4866106e4a 100644 --- a/examples/qml/qmlextensionplugins/plugin.cpp +++ b/examples/qml/qmlextensionplugins/plugin.cpp @@ -87,7 +87,7 @@ signals: void timeChanged(); protected: - void timerEvent(QTimerEvent *) + void timerEvent(QTimerEvent *) override { QTime now = QTime::currentTime(); if (now.second() == 59 && now.minute() == time.minute() && now.hour() == time.hour()) { @@ -125,7 +125,7 @@ public: } } - ~TimeModel() + ~TimeModel() override { if (--instances == 0) { timer->stop(); @@ -154,7 +154,7 @@ class QExampleQmlPlugin : public QQmlExtensionPlugin Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) public: - void registerTypes(const char *uri) + void registerTypes(const char *uri) override { Q_ASSERT(uri == QLatin1String("TimeExample")); qmlRegisterType(uri, 1, 0, "Time"); -- cgit v1.2.3