diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/sensors/qmlsensor.h | 4 | ||||
-rw-r--r-- | src/imports/sensors/sensors.cpp | 2 | ||||
-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 | ||||
-rw-r--r-- | src/sensors/doc/snippets/sensorgestures/myplugin.h | 16 | ||||
-rw-r--r-- | src/sensors/doc/snippets/sensors/mybackend.h | 4 | ||||
-rw-r--r-- | src/sensors/doc/snippets/sensors/plugin.cpp | 4 | ||||
-rw-r--r-- | src/sensors/gestures/qsensorgesture.h | 4 | ||||
-rw-r--r-- | src/sensors/qaccelerometer.h | 2 | ||||
-rw-r--r-- | src/sensors/qambientlightsensor.h | 2 | ||||
-rw-r--r-- | src/sensors/qsensor.h | 2 |
19 files changed, 41 insertions, 41 deletions
diff --git a/src/imports/sensors/qmlsensor.h b/src/imports/sensors/qmlsensor.h index f74aeeb..e46278b 100644 --- a/src/imports/sensors/qmlsensor.h +++ b/src/imports/sensors/qmlsensor.h @@ -167,10 +167,10 @@ private Q_SLOTS: void updateReading(); protected Q_SLOTS: - void componentComplete(); + void componentComplete() override; private: - void classBegin(); + void classBegin() override; virtual void _update(); bool m_parsed; bool m_active; diff --git a/src/imports/sensors/sensors.cpp b/src/imports/sensors/sensors.cpp index 28f85d3..df81880 100644 --- a/src/imports/sensors/sensors.cpp +++ b/src/imports/sensors/sensors.cpp @@ -98,7 +98,7 @@ class QtSensorsDeclarativeModule : public QQmlExtensionPlugin Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid FILE "plugin.json") public: QtSensorsDeclarativeModule(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); } - virtual void registerTypes(const char *uri) + void registerTypes(const char *uri) override { char const * const package = "QtSensors"; if (QLatin1String(uri) != QLatin1String(package)) return; 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); diff --git a/src/sensors/doc/snippets/sensorgestures/myplugin.h b/src/sensors/doc/snippets/sensorgestures/myplugin.h index c03966d..0cf1a92 100644 --- a/src/sensors/doc/snippets/sensorgestures/myplugin.h +++ b/src/sensors/doc/snippets/sensorgestures/myplugin.h @@ -52,12 +52,12 @@ class MySensorGestureRecognizer : public QSensorGestureRecognizer MySensorGestureRecognizer(QObject *parent = 0); ~MySensorGestureRecognizer(); - void create(); + void create() override; - QString id() const; - bool start(); - bool stop(); - bool isActive(); + QString id() const override; + bool start() override; + bool stop() override; + bool isActive() override; Q_SIGNALS: // all signals will get exported to QSensorGesture @@ -74,9 +74,9 @@ public: explicit MySensorGesturePlugin(); ~MySensorGesturePlugin(); - QList <QSensorGestureRecognizer *> createRecognizers(); - QStringList supportedIds() const; - QString name() const { return "MyGestures"; } + QList<QSensorGestureRecognizer *> createRecognizers() override; + QStringList supportedIds() const override; + QString name() const override { return "MyGestures"; } }; #endif diff --git a/src/sensors/doc/snippets/sensors/mybackend.h b/src/sensors/doc/snippets/sensors/mybackend.h index 2c026dc..59c5406 100644 --- a/src/sensors/doc/snippets/sensors/mybackend.h +++ b/src/sensors/doc/snippets/sensors/mybackend.h @@ -47,8 +47,8 @@ class MyBackend : public QSensorBackend { public: MyBackend(QSensor *sensor) : QSensorBackend(sensor) {} - void stop() {} - void start() {} + void stop() override {} + void start() override {} void poll() {} static const char *id; diff --git a/src/sensors/doc/snippets/sensors/plugin.cpp b/src/sensors/doc/snippets/sensors/plugin.cpp index d1c3053..1eef596 100644 --- a/src/sensors/doc/snippets/sensors/plugin.cpp +++ b/src/sensors/doc/snippets/sensors/plugin.cpp @@ -50,12 +50,12 @@ class MyPluginClass : public QObject, public QSensorPluginInterface, public QSen //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, MyBackend::id, this); } - QSensorBackend *createBackend(QSensor *sensor) + QSensorBackend *createBackend(QSensor *sensor) override { if (sensor->identifier() == MyBackend::id) return new MyBackend(sensor); diff --git a/src/sensors/gestures/qsensorgesture.h b/src/sensors/gestures/qsensorgesture.h index 880be69..dd95b3b 100644 --- a/src/sensors/gestures/qsensorgesture.h +++ b/src/sensors/gestures/qsensorgesture.h @@ -76,8 +76,8 @@ private: private: // Pretend to be a Q_OBJECT - const QMetaObject *metaObject() const; - int qt_metacall(QMetaObject::Call, int, void **); + const QMetaObject *metaObject() const override; + int qt_metacall(QMetaObject::Call, int, void **) override; #ifdef Q_QDOC Q_SIGNALS: diff --git a/src/sensors/qaccelerometer.h b/src/sensors/qaccelerometer.h index 1911e5f..a44971f 100644 --- a/src/sensors/qaccelerometer.h +++ b/src/sensors/qaccelerometer.h @@ -69,7 +69,7 @@ class Q_SENSORS_EXPORT QAccelerometerFilter : public QSensorFilter public: virtual bool filter(QAccelerometerReading *reading) = 0; private: - bool filter(QSensorReading *reading); + bool filter(QSensorReading *reading) override; }; class QAccelerometerPrivate; diff --git a/src/sensors/qambientlightsensor.h b/src/sensors/qambientlightsensor.h index f9f7d1b..9d1acec 100644 --- a/src/sensors/qambientlightsensor.h +++ b/src/sensors/qambientlightsensor.h @@ -71,7 +71,7 @@ class Q_SENSORS_EXPORT QAmbientLightFilter : public QSensorFilter public: virtual bool filter(QAmbientLightReading *reading) = 0; private: - bool filter(QSensorReading *reading); + bool filter(QSensorReading *reading) override; }; class Q_SENSORS_EXPORT QAmbientLightSensor : public QSensor diff --git a/src/sensors/qsensor.h b/src/sensors/qsensor.h index cf8de76..7dd7ea1 100644 --- a/src/sensors/qsensor.h +++ b/src/sensors/qsensor.h @@ -263,7 +263,7 @@ private: public:\ classname(QObject *parent = Q_NULLPTR);\ virtual ~classname();\ - void copyValuesFrom(QSensorReading *other);\ + void copyValuesFrom(QSensorReading *other) override;\ private:\ QScopedPointer<pclassname> d; |