diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2016-12-03 01:47:31 +0300 |
---|---|---|
committer | Alexander Volkov <a.volkov@rusbitech.ru> | 2017-11-14 07:04:57 +0000 |
commit | 5858916b27bd261eaa5c3869bc46557e18bd8e02 (patch) | |
tree | e37f84e81ce3beec6c38b25e54b5ab852b843edb /src/plugins | |
parent | e3b6a54a75482c5ddd91dab50a86629053c69a2e (diff) | |
download | qtsensors-5858916b27bd261eaa5c3869bc46557e18bd8e02.tar.gz |
Add missing override and remove redundant virtual
Change-Id: I51c0fc424f44ae68c3c1c4cf6377e7701ee5a0dd
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/sensors/android/src/androidpressure.h | 4 | ||||
-rw-r--r-- | src/plugins/sensors/android/src/main.cpp | 4 | ||||
-rw-r--r-- | src/plugins/sensors/dummy/main.cpp | 4 | ||||
-rw-r--r-- | src/plugins/sensors/generic/main.cpp | 6 | ||||
-rw-r--r-- | src/plugins/sensors/iio-sensor-proxy/main.cpp | 4 | ||||
-rw-r--r-- | src/plugins/sensors/ios/main.mm | 4 | ||||
-rw-r--r-- | src/plugins/sensors/linux/main.cpp | 4 | ||||
-rw-r--r-- | src/plugins/sensors/sensorfw/main.cpp | 4 | ||||
-rw-r--r-- | src/plugins/sensors/simulator/main.cpp | 4 | ||||
-rw-r--r-- | src/plugins/sensors/winrt/main.cpp | 4 |
10 files changed, 21 insertions, 21 deletions
diff --git a/src/plugins/sensors/android/src/androidpressure.h b/src/plugins/sensors/android/src/androidpressure.h index eae1ae6..dbb59c1 100644 --- a/src/plugins/sensors/android/src/androidpressure.h +++ b/src/plugins/sensors/android/src/androidpressure.h @@ -49,8 +49,8 @@ class AndroidPressure : public AndroidCommonSensor<QPressureReading> public: AndroidPressure(AndroidSensors::AndroidSensorType type, QSensor *sensor); private: - virtual void onAccuracyChanged(jint accuracy); - virtual void onSensorChanged(jlong timestamp, const jfloat *values, uint size); + void onAccuracyChanged(jint accuracy) override; + void onSensorChanged(jlong timestamp, const jfloat *values, uint size) override; }; #endif // ANDROIDPRESSURE_H diff --git a/src/plugins/sensors/android/src/main.cpp b/src/plugins/sensors/android/src/main.cpp index 18da9d0..fc80a27 100644 --- a/src/plugins/sensors/android/src/main.cpp +++ b/src/plugins/sensors/android/src/main.cpp @@ -61,7 +61,7 @@ class AndroidSensorPlugin : public QObject, public QSensorPluginInterface, publi Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QSensorPluginInterface/1.0" FILE "plugin.json") Q_INTERFACES(QSensorPluginInterface) public: - void registerSensors() + void registerSensors() override { bool accelerometer = false; bool magnetometer = false; @@ -114,7 +114,7 @@ public: QSensorManager::registerBackend(QCompass::type, AndroidCompass::id, this); } - QSensorBackend *createBackend(QSensor *sensor) + QSensorBackend *createBackend(QSensor *sensor) override { if (sensor->identifier() == AndroidCompass::id) return new AndroidCompass(sensor); diff --git a/src/plugins/sensors/dummy/main.cpp b/src/plugins/sensors/dummy/main.cpp index 181f254..13dd732 100644 --- a/src/plugins/sensors/dummy/main.cpp +++ b/src/plugins/sensors/dummy/main.cpp @@ -51,13 +51,13 @@ class dummySensorPlugin : public QObject, public QSensorPluginInterface, public Q_PLUGIN_METADATA(IID "com.qt-project.Qt.QSensorPluginInterface/1.0" FILE "plugin.json") Q_INTERFACES(QSensorPluginInterface) public: - void registerSensors() + void registerSensors() override { QSensorManager::registerBackend(QAccelerometer::type, dummyaccelerometer::id, this); QSensorManager::registerBackend(QAmbientLightSensor::type, dummylightsensor::id, this); } - QSensorBackend *createBackend(QSensor *sensor) + QSensorBackend *createBackend(QSensor *sensor) override { if (sensor->identifier() == dummyaccelerometer::id) { return new dummyaccelerometer(sensor); diff --git a/src/plugins/sensors/generic/main.cpp b/src/plugins/sensors/generic/main.cpp index 9bed901..44bfff0 100644 --- a/src/plugins/sensors/generic/main.cpp +++ b/src/plugins/sensors/generic/main.cpp @@ -61,12 +61,12 @@ class genericSensorPlugin : public QObject, public QSensorPluginInterface, publi Q_PLUGIN_METADATA(IID "com.qt-project.Qt.QSensorPluginInterface/1.0" FILE "plugin.json") Q_INTERFACES(QSensorPluginInterface QSensorChangesInterface) public: - void registerSensors() + void registerSensors() override { // Nothing to register here } - void sensorsChanged() + void sensorsChanged() override { if (!QSensor::defaultSensorForType(QAccelerometer::type).isEmpty()) { // There is an accelerometer available. Register the backends @@ -110,7 +110,7 @@ public: } } - QSensorBackend *createBackend(QSensor *sensor) + QSensorBackend *createBackend(QSensor *sensor) override { #ifdef QTSENSORS_GENERICORIENTATIONSENSOR if (sensor->identifier() == genericorientationsensor::id) diff --git a/src/plugins/sensors/iio-sensor-proxy/main.cpp b/src/plugins/sensors/iio-sensor-proxy/main.cpp index 5d38833..136dd40 100644 --- a/src/plugins/sensors/iio-sensor-proxy/main.cpp +++ b/src/plugins/sensors/iio-sensor-proxy/main.cpp @@ -55,7 +55,7 @@ class IIOSensorProxySensorPlugin : public QObject, public QSensorPluginInterface Q_PLUGIN_METADATA(IID "com.qt-project.Qt.QSensorPluginInterface/1.0" FILE "plugin.json") Q_INTERFACES(QSensorPluginInterface) public: - void registerSensors() + void registerSensors() override { if (!QSensorManager::isBackendRegistered(QOrientationSensor::type, IIOSensorProxyOrientationSensor::id)) QSensorManager::registerBackend(QOrientationSensor::type, IIOSensorProxyOrientationSensor::id, this); @@ -65,7 +65,7 @@ public: QSensorManager::registerBackend(QCompass::type, IIOSensorProxyCompass::id, this); } - QSensorBackend *createBackend(QSensor *sensor) + QSensorBackend *createBackend(QSensor *sensor) override { if (sensor->identifier() == IIOSensorProxyOrientationSensor::id) return new IIOSensorProxyOrientationSensor(sensor); diff --git a/src/plugins/sensors/ios/main.mm b/src/plugins/sensors/ios/main.mm index a4766c3..d6b9819 100644 --- a/src/plugins/sensors/ios/main.mm +++ b/src/plugins/sensors/ios/main.mm @@ -59,7 +59,7 @@ class IOSSensorPlugin : public QObject, public QSensorPluginInterface, public QS Q_PLUGIN_METADATA(IID "com.qt-project.Qt.QSensorPluginInterface/1.0" FILE "plugin.json") Q_INTERFACES(QSensorPluginInterface) public: - void registerSensors() + void registerSensors() override { #ifdef HAVE_COREMOTION QSensorManager::registerBackend(QAccelerometer::type, IOSAccelerometer::id, this); @@ -78,7 +78,7 @@ public: #endif } - QSensorBackend *createBackend(QSensor *sensor) + QSensorBackend *createBackend(QSensor *sensor) override { #ifdef HAVE_COREMOTION if (sensor->identifier() == IOSAccelerometer::id) diff --git a/src/plugins/sensors/linux/main.cpp b/src/plugins/sensors/linux/main.cpp index 3f68cd1..a82ab82 100644 --- a/src/plugins/sensors/linux/main.cpp +++ b/src/plugins/sensors/linux/main.cpp @@ -52,14 +52,14 @@ class LinuxSensorPlugin : public QObject, public QSensorPluginInterface, public Q_PLUGIN_METADATA(IID "com.qt-project.Qt.QSensorPluginInterface/1.0" FILE "plugin.json") Q_INTERFACES(QSensorPluginInterface) public: - void registerSensors() + void registerSensors() override { QString path = QString::fromLatin1(qgetenv("QT_ACCEL_FILEPATH")); if (!path.isEmpty() && !QSensorManager::isBackendRegistered(QAccelerometer::type, LinuxSysAccelerometer::id)) QSensorManager::registerBackend(QAccelerometer::type, LinuxSysAccelerometer::id, this); } - QSensorBackend *createBackend(QSensor *sensor) + QSensorBackend *createBackend(QSensor *sensor) override { if (sensor->identifier() == LinuxSysAccelerometer::id) return new LinuxSysAccelerometer(sensor); diff --git a/src/plugins/sensors/sensorfw/main.cpp b/src/plugins/sensors/sensorfw/main.cpp index bc1246a..c1a02a5 100644 --- a/src/plugins/sensors/sensorfw/main.cpp +++ b/src/plugins/sensors/sensorfw/main.cpp @@ -64,7 +64,7 @@ class sensorfwSensorPlugin : public QObject, public QSensorPluginInterface, publ public: - void registerSensors() + void registerSensors() override { // if no default - no support either, uses Sensors.conf QSettings settings(QSettings::SystemScope, QLatin1String("QtProject"), QLatin1String("Sensors")); @@ -78,7 +78,7 @@ public: } - QSensorBackend *createBackend(QSensor *sensor) + QSensorBackend *createBackend(QSensor *sensor) override { if (sensor->identifier() == sensorfwaccelerometer::id) return new sensorfwaccelerometer(sensor); diff --git a/src/plugins/sensors/simulator/main.cpp b/src/plugins/sensors/simulator/main.cpp index a1b0025..167711a 100644 --- a/src/plugins/sensors/simulator/main.cpp +++ b/src/plugins/sensors/simulator/main.cpp @@ -61,7 +61,7 @@ public: connect(connection, SIGNAL(setAvailableFeatures(quint32)), this, SLOT(setAvailableFeatures(quint32))); } - void registerSensors() + void registerSensors() override { QSensorManager::registerBackend(QAccelerometer::type, SimulatorAccelerometer::id, this); QSensorManager::registerBackend(QAmbientLightSensor::type, SimulatorAmbientLightSensor::id, this); @@ -72,7 +72,7 @@ public: QSensorManager::registerBackend(QMagnetometer::type, SimulatorMagnetometer::id, this); } - QSensorBackend *createBackend(QSensor *sensor) + QSensorBackend *createBackend(QSensor *sensor) override { if (sensor->identifier() == SimulatorAccelerometer::id) { return new SimulatorAccelerometer(sensor); diff --git a/src/plugins/sensors/winrt/main.cpp b/src/plugins/sensors/winrt/main.cpp index 565d8fe..ecf2a41 100644 --- a/src/plugins/sensors/winrt/main.cpp +++ b/src/plugins/sensors/winrt/main.cpp @@ -59,7 +59,7 @@ class WinRtSensorPlugin : public QObject, public QSensorPluginInterface, public Q_PLUGIN_METADATA(IID "com.qt-project.Qt.QSensorPluginInterface/1.0" FILE "plugin.json") Q_INTERFACES(QSensorPluginInterface) public: - void registerSensors() + void registerSensors() override { QSensorManager::registerBackend(QAccelerometer::type, QByteArrayLiteral("WinRtAccelerometer"), this); QSensorManager::registerBackend(QCompass::type, QByteArrayLiteral("WinRtCompass"), this); @@ -69,7 +69,7 @@ public: QSensorManager::registerBackend(QOrientationSensor::type, QByteArrayLiteral("WinRtOrientationSensor"), this); } - QSensorBackend *createBackend(QSensor *sensor) + QSensorBackend *createBackend(QSensor *sensor) override { if (sensor->identifier() == QByteArrayLiteral("WinRtAccelerometer")) return new WinRtAccelerometer(sensor); |