diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-02-26 17:34:27 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-02-27 08:27:38 +0000 |
commit | e17c89f4ce74e5699ed50dc2187a39d8990316c4 (patch) | |
tree | b1f9b85d5bd1233d8931813dc4e06f7342be2249 /examples/qml | |
parent | e41d067227eb6225b05df88ab724708588fa5304 (diff) |
use the override keyword consistently and correctly (clang-tidy)
Change-Id: If9e28d143f8cba3df3c757476b4f2265e2eb8b2a
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'examples/qml')
-rw-r--r-- | examples/qml/networkaccessmanagerfactory/main.cpp | 2 | ||||
-rw-r--r-- | examples/qml/qmlextensionplugins/plugin.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
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<TimeModel>(uri, 1, 0, "Time"); |