summaryrefslogtreecommitdiffstats
path: root/examples/sensors/grue/plugin
diff options
context:
space:
mode:
authorAlexander Volkov <a.volkov@rusbitech.ru>2016-12-03 01:47:31 +0300
committerAlexander Volkov <a.volkov@rusbitech.ru>2017-11-14 07:04:57 +0000
commit5858916b27bd261eaa5c3869bc46557e18bd8e02 (patch)
treee37f84e81ce3beec6c38b25e54b5ab852b843edb /examples/sensors/grue/plugin
parente3b6a54a75482c5ddd91dab50a86629053c69a2e (diff)
Add missing override and remove redundant virtual
Change-Id: I51c0fc424f44ae68c3c1c4cf6377e7701ee5a0dd Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'examples/sensors/grue/plugin')
-rw-r--r--examples/sensors/grue/plugin/gruesensorimpl.h4
-rw-r--r--examples/sensors/grue/plugin/main.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/examples/sensors/grue/plugin/gruesensorimpl.h b/examples/sensors/grue/plugin/gruesensorimpl.h
index 15c23b5f..0847ed9c 100644
--- a/examples/sensors/grue/plugin/gruesensorimpl.h
+++ b/examples/sensors/grue/plugin/gruesensorimpl.h
@@ -68,8 +68,8 @@ public:
gruesensorimpl(QSensor *sensor);
- void start();
- void stop();
+ void start() override;
+ void stop() override;
private Q_SLOTS:
void lightChanged();
diff --git a/examples/sensors/grue/plugin/main.cpp b/examples/sensors/grue/plugin/main.cpp
index c8fdc1d1..4c5da15d 100644
--- a/examples/sensors/grue/plugin/main.cpp
+++ b/examples/sensors/grue/plugin/main.cpp
@@ -61,12 +61,12 @@ class GrueSensorPlugin : public QObject, public QSensorPluginInterface, public Q
Q_PLUGIN_METADATA(IID "com.qt-project.Qt.QSensorPluginInterface/1.0" FILE "plugin.json")
Q_INTERFACES(QSensorPluginInterface QSensorChangesInterface)
public:
- void registerSensors()
+ void registerSensors() override
{
qDebug() << "loaded the grue plugin";
}
- void sensorsChanged()
+ void sensorsChanged() override
{
if (!QSensor::defaultSensorForType(QAmbientLightSensor::type).isEmpty()) {
// There is a light sensor available. Register the backend
@@ -78,7 +78,7 @@ public:
}
}
- QSensorBackend *createBackend(QSensor *sensor)
+ QSensorBackend *createBackend(QSensor *sensor) override
{
if (sensor->identifier() == gruesensorimpl::id)
return new gruesensorimpl(sensor);