summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorKevin Funk <kevin.funk.ford@kdab.com>2017-09-20 21:23:02 +0200
committerKevin Funk <kevin.funk@kdab.com>2017-09-21 10:54:47 +0000
commit092da44ffde5ad73a60b15782cf217bff5dc632d (patch)
treea9ea8c9c35cec0b43427d5980511fc7da6e1c476 /examples
parent92b172887a5efd8ca4fd387c82ea17cc4ed969d0 (diff)
Modernize: Use override where possible
Change-Id: Id67366f3eaf251b1f2c8d9a91a41dec72117cc7c Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/remoteobjects/plugins/plugin.cpp6
-rw-r--r--examples/remoteobjects/server/timemodel.h6
-rw-r--r--examples/remoteobjects/simpleswitch/directconnectclient/client.h2
-rw-r--r--examples/remoteobjects/simpleswitch/directconnectdynamicclient/dynamicclient.h2
-rw-r--r--examples/remoteobjects/simpleswitch/directconnectserver/simpleswitch.h4
-rw-r--r--examples/remoteobjects/simpleswitch/registryconnectedclient/dynamicclient.h2
-rw-r--r--examples/remoteobjects/simpleswitch/registryconnectedserver/simpleswitch.h4
7 files changed, 13 insertions, 13 deletions
diff --git a/examples/remoteobjects/plugins/plugin.cpp b/examples/remoteobjects/plugins/plugin.cpp
index 7e91afa..9590d26 100644
--- a/examples/remoteobjects/plugins/plugin.cpp
+++ b/examples/remoteobjects/plugins/plugin.cpp
@@ -83,7 +83,7 @@ public:
connect(d_ptr.data(), SIGNAL(sendCustom(PresetInfo)), this, SLOT(testCustom(PresetInfo)));
}
- ~TimeModel()
+ ~TimeModel() override
{
}
@@ -120,7 +120,7 @@ class QExampleQmlPlugin : public QQmlExtensionPlugin
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
public:
- void initializeEngine(QQmlEngine *engine, const char *uri)
+ void initializeEngine(QQmlEngine *engine, const char *uri) override
{
Q_UNUSED(engine);
Q_UNUSED(uri);
@@ -128,7 +128,7 @@ public:
engine->addImportPath(QStringLiteral("qrc:/qml"));
m_client.setRegistryUrl(QUrl(QStringLiteral("local:registry")));
}
- void registerTypes(const char *uri)
+ void registerTypes(const char *uri) override
{
Q_ASSERT(uri == QLatin1String("TimeExample"));
qmlRegisterType<TimeModel>(uri, 1, 0, "Time");
diff --git a/examples/remoteobjects/server/timemodel.h b/examples/remoteobjects/server/timemodel.h
index f03a18f..09c594a 100644
--- a/examples/remoteobjects/server/timemodel.h
+++ b/examples/remoteobjects/server/timemodel.h
@@ -56,13 +56,13 @@ class MinuteTimer : public MinuteTimerSimpleSource
Q_OBJECT
public:
MinuteTimer(QObject *parent = nullptr);
- virtual ~MinuteTimer();
+ ~MinuteTimer() override;
public slots:
- virtual void SetTimeZone(const int &zn);
+ void SetTimeZone(const int &zn) override;
protected:
- void timerEvent(QTimerEvent *);
+ void timerEvent(QTimerEvent *) override;
private:
QTime time;
diff --git a/examples/remoteobjects/simpleswitch/directconnectclient/client.h b/examples/remoteobjects/simpleswitch/directconnectclient/client.h
index 09d1bd6..9d86b74 100644
--- a/examples/remoteobjects/simpleswitch/directconnectclient/client.h
+++ b/examples/remoteobjects/simpleswitch/directconnectclient/client.h
@@ -61,7 +61,7 @@ class Client : public QObject
Q_OBJECT
public:
Client(QSharedPointer<SimpleSwitchReplica> ptr);
- ~Client();
+ ~Client() override;
void initConnections();// function connect signals and slots of source and client
Q_SIGNALS:
diff --git a/examples/remoteobjects/simpleswitch/directconnectdynamicclient/dynamicclient.h b/examples/remoteobjects/simpleswitch/directconnectdynamicclient/dynamicclient.h
index 9003fa5..ad948a9 100644
--- a/examples/remoteobjects/simpleswitch/directconnectdynamicclient/dynamicclient.h
+++ b/examples/remoteobjects/simpleswitch/directconnectdynamicclient/dynamicclient.h
@@ -62,7 +62,7 @@ class DynamicClient : public QObject
Q_OBJECT
public:
DynamicClient(QSharedPointer<QRemoteObjectDynamicReplica> ptr);
- ~DynamicClient();
+ ~DynamicClient() override;
Q_SIGNALS:
void echoSwitchState(bool switchState);// this signal is connected with server_slot(..) slot of source object and echoes back switch state received from source
diff --git a/examples/remoteobjects/simpleswitch/directconnectserver/simpleswitch.h b/examples/remoteobjects/simpleswitch/directconnectserver/simpleswitch.h
index c10f91e..48ea61c 100644
--- a/examples/remoteobjects/simpleswitch/directconnectserver/simpleswitch.h
+++ b/examples/remoteobjects/simpleswitch/directconnectserver/simpleswitch.h
@@ -58,8 +58,8 @@ class SimpleSwitch : public SimpleSwitchSimpleSource
Q_OBJECT
public:
SimpleSwitch(QObject *parent = nullptr);
- ~SimpleSwitch();
- virtual void server_slot(bool clientState);
+ ~SimpleSwitch() override;
+ void server_slot(bool clientState) override;
public Q_SLOTS:
void timeout_slot();
private:
diff --git a/examples/remoteobjects/simpleswitch/registryconnectedclient/dynamicclient.h b/examples/remoteobjects/simpleswitch/registryconnectedclient/dynamicclient.h
index 9003fa5..ad948a9 100644
--- a/examples/remoteobjects/simpleswitch/registryconnectedclient/dynamicclient.h
+++ b/examples/remoteobjects/simpleswitch/registryconnectedclient/dynamicclient.h
@@ -62,7 +62,7 @@ class DynamicClient : public QObject
Q_OBJECT
public:
DynamicClient(QSharedPointer<QRemoteObjectDynamicReplica> ptr);
- ~DynamicClient();
+ ~DynamicClient() override;
Q_SIGNALS:
void echoSwitchState(bool switchState);// this signal is connected with server_slot(..) slot of source object and echoes back switch state received from source
diff --git a/examples/remoteobjects/simpleswitch/registryconnectedserver/simpleswitch.h b/examples/remoteobjects/simpleswitch/registryconnectedserver/simpleswitch.h
index c10f91e..48ea61c 100644
--- a/examples/remoteobjects/simpleswitch/registryconnectedserver/simpleswitch.h
+++ b/examples/remoteobjects/simpleswitch/registryconnectedserver/simpleswitch.h
@@ -58,8 +58,8 @@ class SimpleSwitch : public SimpleSwitchSimpleSource
Q_OBJECT
public:
SimpleSwitch(QObject *parent = nullptr);
- ~SimpleSwitch();
- virtual void server_slot(bool clientState);
+ ~SimpleSwitch() override;
+ void server_slot(bool clientState) override;
public Q_SLOTS:
void timeout_slot();
private: