summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJuha Vuolle <juha.vuolle@insta.fi>2021-05-12 10:17:24 +0300
committerJuha Vuolle <juha.vuolle@insta.fi>2021-05-19 08:25:33 +0300
commitd70a9906fced63aa1b8502dbdac58d4c244ef956 (patch)
tree0db8326ab7dd36da26e08e0825be01f631cbc3c7 /src
parent8eb9e3dd16c0057f81fa41c001722f31af32dfdf (diff)
Rename subclass static variable which shadowed baseclass method
The 'type' static variable shadowed the 'QSensors::type()' method of the baseclass. While this is easy to workaround it is better to remove such naming clash. Task-number: QTBUG-60246 Change-Id: Id0ddae978377ea4d4d0202a572c554c2541f9364 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/sensors/android/main.cpp18
-rw-r--r--src/plugins/sensors/dummy/main.cpp4
-rw-r--r--src/plugins/sensors/generic/main.cpp37
-rw-r--r--src/plugins/sensors/iio-sensor-proxy/main.cpp12
-rw-r--r--src/plugins/sensors/ios/main.mm10
-rw-r--r--src/plugins/sensors/linux/main.cpp4
-rw-r--r--src/plugins/sensors/sensorfw/sensorfwsensorbase.cpp7
-rw-r--r--src/plugins/sensors/sensortag/main.cpp32
-rw-r--r--src/plugins/sensors/winrt/main.cpp12
-rw-r--r--src/sensors/doc/snippets/sensors/creating.cpp2
-rw-r--r--src/sensors/doc/snippets/sensors/plugin.cpp2
-rw-r--r--src/sensors/doc/src/qt6-changes.qdoc9
-rwxr-xr-xsrc/sensors/make_sensor.pl7
-rw-r--r--src/sensors/qaccelerometer.cpp4
-rw-r--r--src/sensors/qaccelerometer.h2
-rw-r--r--src/sensors/qaltimeter.cpp4
-rw-r--r--src/sensors/qaltimeter.h2
-rw-r--r--src/sensors/qambientlightsensor.cpp4
-rw-r--r--src/sensors/qambientlightsensor.h2
-rw-r--r--src/sensors/qambienttemperaturesensor.cpp4
-rw-r--r--src/sensors/qambienttemperaturesensor.h2
-rw-r--r--src/sensors/qcompass.cpp4
-rw-r--r--src/sensors/qcompass.h2
-rw-r--r--src/sensors/qdistancesensor.cpp4
-rw-r--r--src/sensors/qdistancesensor.h2
-rw-r--r--src/sensors/qgyroscope.cpp4
-rw-r--r--src/sensors/qgyroscope.h2
-rw-r--r--src/sensors/qholstersensor.cpp4
-rw-r--r--src/sensors/qholstersensor.h2
-rw-r--r--src/sensors/qhumiditysensor.cpp4
-rw-r--r--src/sensors/qhumiditysensor.h2
-rw-r--r--src/sensors/qirproximitysensor.cpp4
-rw-r--r--src/sensors/qirproximitysensor.h2
-rw-r--r--src/sensors/qlidsensor.cpp4
-rw-r--r--src/sensors/qlidsensor.h2
-rw-r--r--src/sensors/qlightsensor.cpp4
-rw-r--r--src/sensors/qlightsensor.h2
-rw-r--r--src/sensors/qmagnetometer.cpp4
-rw-r--r--src/sensors/qmagnetometer.h2
-rw-r--r--src/sensors/qorientationsensor.cpp4
-rw-r--r--src/sensors/qorientationsensor.h2
-rw-r--r--src/sensors/qpressuresensor.cpp4
-rw-r--r--src/sensors/qpressuresensor.h2
-rw-r--r--src/sensors/qproximitysensor.cpp4
-rw-r--r--src/sensors/qproximitysensor.h2
-rw-r--r--src/sensors/qrotationsensor.cpp4
-rw-r--r--src/sensors/qrotationsensor.h2
-rw-r--r--src/sensors/qtapsensor.cpp4
-rw-r--r--src/sensors/qtapsensor.h2
-rw-r--r--src/sensors/qtiltsensor.cpp4
-rw-r--r--src/sensors/qtiltsensor.h2
51 files changed, 138 insertions, 132 deletions
diff --git a/src/plugins/sensors/android/main.cpp b/src/plugins/sensors/android/main.cpp
index 85853cd2..2d6f74ef 100644
--- a/src/plugins/sensors/android/main.cpp
+++ b/src/plugins/sensors/android/main.cpp
@@ -77,7 +77,7 @@ public:
switch (sensor) {
case ASENSOR_TYPE_ACCELEROMETER:
m_accelerationModes |= AndroidAccelerometer::Accelerometer;
- QSensorManager::registerBackend(QAccelerometer::type, QByteArray::number(sensor), this);
+ QSensorManager::registerBackend(QAccelerometer::sensorType, QByteArray::number(sensor), this);
accelerometer = true;
break;
case ASENSOR_TYPE_GRAVITY:
@@ -87,26 +87,26 @@ public:
m_accelerationModes |= AndroidAccelerometer::LinearAcceleration;
break;
case ASENSOR_TYPE_AMBIENT_TEMPERATURE:
- QSensorManager::registerBackend(QAmbientTemperatureSensor::type, QByteArray::number(sensor), this);
+ QSensorManager::registerBackend(QAmbientTemperatureSensor::sensorType, QByteArray::number(sensor), this);
break;
case ASENSOR_TYPE_GYROSCOPE:
- QSensorManager::registerBackend(QGyroscope::type, QByteArray::number(sensor), this);
+ QSensorManager::registerBackend(QGyroscope::sensorType, QByteArray::number(sensor), this);
break;
case ASENSOR_TYPE_LIGHT:
- QSensorManager::registerBackend(QLightSensor::type, QByteArray::number(sensor), this);
+ QSensorManager::registerBackend(QLightSensor::sensorType, QByteArray::number(sensor), this);
break;
case ASENSOR_TYPE_MAGNETIC_FIELD:
- QSensorManager::registerBackend(QMagnetometer::type, QByteArray::number(sensor), this);
+ QSensorManager::registerBackend(QMagnetometer::sensorType, QByteArray::number(sensor), this);
magnetometer = true;
break;
case ASENSOR_TYPE_PRESSURE:
- QSensorManager::registerBackend(QPressureSensor::type, QByteArray::number(sensor), this);
+ QSensorManager::registerBackend(QPressureSensor::sensorType, QByteArray::number(sensor), this);
break;
case ASENSOR_TYPE_PROXIMITY:
- QSensorManager::registerBackend(QProximitySensor::type, QByteArray::number(sensor), this);
+ QSensorManager::registerBackend(QProximitySensor::sensorType, QByteArray::number(sensor), this);
break;
case ASENSOR_TYPE_ROTATION_VECTOR:
- QSensorManager::registerBackend(QRotationSensor::type, QByteArray::number(sensor), this);
+ QSensorManager::registerBackend(QRotationSensor::sensorType, QByteArray::number(sensor), this);
break;
case ASENSOR_TYPE_RELATIVE_HUMIDITY:
@@ -128,7 +128,7 @@ public:
}
}
if (accelerometer && magnetometer)
- QSensorManager::registerBackend(QCompass::type, AndroidCompassId, this);
+ QSensorManager::registerBackend(QCompass::sensorType, AndroidCompassId, this);
}
QSensorBackend *createBackend(QSensor *sensor) override
diff --git a/src/plugins/sensors/dummy/main.cpp b/src/plugins/sensors/dummy/main.cpp
index 13dd732e..2c515637 100644
--- a/src/plugins/sensors/dummy/main.cpp
+++ b/src/plugins/sensors/dummy/main.cpp
@@ -53,8 +53,8 @@ class dummySensorPlugin : public QObject, public QSensorPluginInterface, public
public:
void registerSensors() override
{
- QSensorManager::registerBackend(QAccelerometer::type, dummyaccelerometer::id, this);
- QSensorManager::registerBackend(QAmbientLightSensor::type, dummylightsensor::id, this);
+ QSensorManager::registerBackend(QAccelerometer::sensorType, dummyaccelerometer::id, this);
+ QSensorManager::registerBackend(QAmbientLightSensor::sensorType, dummylightsensor::id, this);
}
QSensorBackend *createBackend(QSensor *sensor) override
diff --git a/src/plugins/sensors/generic/main.cpp b/src/plugins/sensors/generic/main.cpp
index 44bfff09..0ec87e61 100644
--- a/src/plugins/sensors/generic/main.cpp
+++ b/src/plugins/sensors/generic/main.cpp
@@ -68,44 +68,44 @@ public:
void sensorsChanged() override
{
- if (!QSensor::defaultSensorForType(QAccelerometer::type).isEmpty()) {
+ if (!QSensor::defaultSensorForType(QAccelerometer::sensorType).isEmpty()) {
// There is an accelerometer available. Register the backends
#ifdef QTSENSORS_GENERICORIENTATIONSENSOR
- if (!QSensorManager::isBackendRegistered(QOrientationSensor::type, genericorientationsensor::id))
- QSensorManager::registerBackend(QOrientationSensor::type, genericorientationsensor::id, this);
+ if (!QSensorManager::isBackendRegistered(QOrientationSensor::sensorType, genericorientationsensor::id))
+ QSensorManager::registerBackend(QOrientationSensor::sensorType, genericorientationsensor::id, this);
#endif
#ifdef QTSENSORS_GENERICROTATIONSENSOR
- if (!QSensorManager::isBackendRegistered(QRotationSensor::type, genericrotationsensor::id))
- QSensorManager::registerBackend(QRotationSensor::type, genericrotationsensor::id, this);
+ if (!QSensorManager::isBackendRegistered(QRotationSensor::sensorType, genericrotationsensor::id))
+ QSensorManager::registerBackend(QRotationSensor::sensorType, genericrotationsensor::id, this);
#endif
#ifdef QTSENSORS_GENERICTILTSENSOR
- if (!QSensorManager::isBackendRegistered(QTiltSensor::type, GenericTiltSensor::id))
- QSensorManager::registerBackend(QTiltSensor::type, GenericTiltSensor::id, this);
+ if (!QSensorManager::isBackendRegistered(QTiltSensor::sensorType, GenericTiltSensor::id))
+ QSensorManager::registerBackend(QTiltSensor::sensorType, GenericTiltSensor::id, this);
#endif
} else {
#ifdef QTSENSORS_GENERICORIENTATIONSENSOR
- if (QSensorManager::isBackendRegistered(QOrientationSensor::type, genericorientationsensor::id))
- QSensorManager::unregisterBackend(QOrientationSensor::type, genericorientationsensor::id);
+ if (QSensorManager::isBackendRegistered(QOrientationSensor::sensorType, genericorientationsensor::id))
+ QSensorManager::unregisterBackend(QOrientationSensor::sensorType, genericorientationsensor::id);
#endif
#ifdef QTSENSORS_GENERICROTATIONSENSOR
- if (QSensorManager::isBackendRegistered(QRotationSensor::type, genericrotationsensor::id))
- QSensorManager::unregisterBackend(QRotationSensor::type, genericrotationsensor::id);
+ if (QSensorManager::isBackendRegistered(QRotationSensor::sensorType, genericrotationsensor::id))
+ QSensorManager::unregisterBackend(QRotationSensor::sensorType, genericrotationsensor::id);
#endif
#ifdef QTSENSORS_GENERICTILTSENSOR
- if (QSensorManager::isBackendRegistered(QTiltSensor::type, GenericTiltSensor::id))
- QSensorManager::unregisterBackend(QTiltSensor::type, GenericTiltSensor::id);
+ if (QSensorManager::isBackendRegistered(QTiltSensor::sensorType, GenericTiltSensor::id))
+ QSensorManager::unregisterBackend(QTiltSensor::sensorType, GenericTiltSensor::id);
#endif
}
- if (!QSensor::defaultSensorForType(QLightSensor::type).isEmpty()) {
+ if (!QSensor::defaultSensorForType(QLightSensor::sensorType).isEmpty()) {
#ifdef QTSENSORS_GENERICALSSENSOR
- if (!QSensorManager::isBackendRegistered(QAmbientLightSensor::type, genericalssensor::id))
- QSensorManager::registerBackend(QAmbientLightSensor::type, genericalssensor::id, this);
+ if (!QSensorManager::isBackendRegistered(QAmbientLightSensor::sensorType, genericalssensor::id))
+ QSensorManager::registerBackend(QAmbientLightSensor::sensorType, genericalssensor::id, this);
#endif
} else {
#ifdef QTSENSORS_GENERICALSSENSOR
- if (QSensorManager::isBackendRegistered(QAmbientLightSensor::type, genericalssensor::id))
- QSensorManager::unregisterBackend(QAmbientLightSensor::type, genericalssensor::id);
+ if (QSensorManager::isBackendRegistered(QAmbientLightSensor::sensorType, genericalssensor::id))
+ QSensorManager::unregisterBackend(QAmbientLightSensor::sensorType, genericalssensor::id);
#endif
}
}
@@ -134,4 +134,3 @@ public:
};
#include "main.moc"
-
diff --git a/src/plugins/sensors/iio-sensor-proxy/main.cpp b/src/plugins/sensors/iio-sensor-proxy/main.cpp
index 580e2c46..0fc10b8e 100644
--- a/src/plugins/sensors/iio-sensor-proxy/main.cpp
+++ b/src/plugins/sensors/iio-sensor-proxy/main.cpp
@@ -61,12 +61,12 @@ public:
void registerSensors() override
{
if (QDBusConnection::systemBus().interface()->isServiceRegistered("net.hadess.SensorProxy")) {
- if (!QSensorManager::isBackendRegistered(QOrientationSensor::type, IIOSensorProxyOrientationSensor::id))
- QSensorManager::registerBackend(QOrientationSensor::type, IIOSensorProxyOrientationSensor::id, this);
- if (!QSensorManager::isBackendRegistered(QLightSensor::type, IIOSensorProxyLightSensor::id))
- QSensorManager::registerBackend(QLightSensor::type, IIOSensorProxyLightSensor::id, this);
- if (!QSensorManager::isBackendRegistered(QCompass::type, IIOSensorProxyCompass::id))
- QSensorManager::registerBackend(QCompass::type, IIOSensorProxyCompass::id, this);
+ if (!QSensorManager::isBackendRegistered(QOrientationSensor::sensorType, IIOSensorProxyOrientationSensor::id))
+ QSensorManager::registerBackend(QOrientationSensor::sensorType, IIOSensorProxyOrientationSensor::id, this);
+ if (!QSensorManager::isBackendRegistered(QLightSensor::sensorType, IIOSensorProxyLightSensor::id))
+ QSensorManager::registerBackend(QLightSensor::sensorType, IIOSensorProxyLightSensor::id, this);
+ if (!QSensorManager::isBackendRegistered(QCompass::sensorType, IIOSensorProxyCompass::id))
+ QSensorManager::registerBackend(QCompass::sensorType, IIOSensorProxyCompass::id, this);
}
}
diff --git a/src/plugins/sensors/ios/main.mm b/src/plugins/sensors/ios/main.mm
index d6b98192..13c71961 100644
--- a/src/plugins/sensors/ios/main.mm
+++ b/src/plugins/sensors/ios/main.mm
@@ -62,19 +62,19 @@ public:
void registerSensors() override
{
#ifdef HAVE_COREMOTION
- QSensorManager::registerBackend(QAccelerometer::type, IOSAccelerometer::id, this);
+ QSensorManager::registerBackend(QAccelerometer::sensorType, IOSAccelerometer::id, this);
if ([QIOSMotionManager sharedManager].gyroAvailable)
- QSensorManager::registerBackend(QGyroscope::type, IOSGyroscope::id, this);
+ QSensorManager::registerBackend(QGyroscope::sensorType, IOSGyroscope::id, this);
if ([QIOSMotionManager sharedManager].magnetometerAvailable)
- QSensorManager::registerBackend(QMagnetometer::type, IOSMagnetometer::id, this);
+ QSensorManager::registerBackend(QMagnetometer::sensorType, IOSMagnetometer::id, this);
#endif
#ifdef HAVE_COMPASS
if ([CLLocationManager headingAvailable])
- QSensorManager::registerBackend(QCompass::type, IOSCompass::id, this);
+ QSensorManager::registerBackend(QCompass::sensorType, IOSCompass::id, this);
#endif
#ifdef HAVE_UIDEVICE
if (IOSProximitySensor::available())
- QSensorManager::registerBackend(QProximitySensor::type, IOSProximitySensor::id, this);
+ QSensorManager::registerBackend(QProximitySensor::sensorType, IOSProximitySensor::id, this);
#endif
}
diff --git a/src/plugins/sensors/linux/main.cpp b/src/plugins/sensors/linux/main.cpp
index a82ab821..6531d9d3 100644
--- a/src/plugins/sensors/linux/main.cpp
+++ b/src/plugins/sensors/linux/main.cpp
@@ -55,8 +55,8 @@ public:
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);
+ if (!path.isEmpty() && !QSensorManager::isBackendRegistered(QAccelerometer::sensorType, LinuxSysAccelerometer::id))
+ QSensorManager::registerBackend(QAccelerometer::sensorType, LinuxSysAccelerometer::id, this);
}
QSensorBackend *createBackend(QSensor *sensor) override
diff --git a/src/plugins/sensors/sensorfw/sensorfwsensorbase.cpp b/src/plugins/sensors/sensorfw/sensorfwsensorbase.cpp
index 27a07ad6..7a5a7cd8 100644
--- a/src/plugins/sensors/sensorfw/sensorfwsensorbase.cpp
+++ b/src/plugins/sensors/sensorfw/sensorfwsensorbase.cpp
@@ -92,7 +92,7 @@ void SensorfwSensorBase::start()
if (m_sensorInterface) {
// dataRate
QByteArray type = sensor()->type();
- if (type != QTapSensor::type && type != QProximitySensor::type) {
+ if (type != QTapSensor::sensorType && type != QProximitySensor::sensorType) {
int dataRate = sensor()->dataRate();
int interval = dataRate > 0 ? 1000 / dataRate : 0;
// for testing maximum speed
@@ -291,8 +291,8 @@ bool SensorfwSensorBase::initSensorInterface(QString const &name)
// TODO deztructor: Leaking abstraction detected. Just copied code
// from initSensor<>() here, need to
QByteArray type = sensor()->type();
- if ((type == QAmbientLightSensor::type) // SensorFW returns lux values, plugin enumerated values
- || (type == QIRProximitySensor::type) // SensorFW returns raw reflectance values, plugin % of max reflectance
+ if ((type == QAmbientLightSensor::sensorType) // SensorFW returns lux values, plugin enumerated values
+ || (type == QIRProximitySensor::sensorType) // SensorFW returns raw reflectance values, plugin % of max reflectance
|| (name == "accelerometersensor") // SensorFW returns milliGs, plugin m/s^2
|| (name == "magnetometersensor") // SensorFW returns nanoTeslas, plugin Teslas
|| (name == "gyroscopesensor")) // SensorFW returns DSPs, plugin milliDSPs
@@ -330,4 +330,3 @@ bool SensorfwSensorBase::isFeatureSupported(QSensor::Feature feature) const
return false;
}
-
diff --git a/src/plugins/sensors/sensortag/main.cpp b/src/plugins/sensors/sensortag/main.cpp
index e6dc54e5..9ad5cd71 100644
--- a/src/plugins/sensors/sensortag/main.cpp
+++ b/src/plugins/sensors/sensortag/main.cpp
@@ -63,29 +63,29 @@ public:
void registerSensors()
{
- if (!QSensorManager::isBackendRegistered(QAccelerometer::type, SensorTagAccelerometer::id))
- QSensorManager::registerBackend(QAccelerometer::type, SensorTagAccelerometer::id, this);
+ if (!QSensorManager::isBackendRegistered(QAccelerometer::sensorType, SensorTagAccelerometer::id))
+ QSensorManager::registerBackend(QAccelerometer::sensorType, SensorTagAccelerometer::id, this);
- if (!QSensorManager::isBackendRegistered(QAmbientLightSensor::type, SensorTagAls::id))
- QSensorManager::registerBackend(QAmbientLightSensor::type, SensorTagAls::id, this);
+ if (!QSensorManager::isBackendRegistered(QAmbientLightSensor::sensorType, SensorTagAls::id))
+ QSensorManager::registerBackend(QAmbientLightSensor::sensorType, SensorTagAls::id, this);
- if (!QSensorManager::isBackendRegistered(QLightSensor::type, SensorTagLightSensor::id))
- QSensorManager::registerBackend(QLightSensor::type, SensorTagLightSensor::id, this);
+ if (!QSensorManager::isBackendRegistered(QLightSensor::sensorType, SensorTagLightSensor::id))
+ QSensorManager::registerBackend(QLightSensor::sensorType, SensorTagLightSensor::id, this);
- if (!QSensorManager::isBackendRegistered(QAmbientTemperatureSensor::type, SensorTagTemperatureSensor::id))
- QSensorManager::registerBackend(QAmbientTemperatureSensor::type, SensorTagTemperatureSensor::id, this);
+ if (!QSensorManager::isBackendRegistered(QAmbientTemperatureSensor::sensorType, SensorTagTemperatureSensor::id))
+ QSensorManager::registerBackend(QAmbientTemperatureSensor::sensorType, SensorTagTemperatureSensor::id, this);
- if (!QSensorManager::isBackendRegistered(QHumiditySensor::type, SensorTagHumiditySensor::id))
- QSensorManager::registerBackend(QHumiditySensor::type, SensorTagHumiditySensor::id, this);
+ if (!QSensorManager::isBackendRegistered(QHumiditySensor::sensorType, SensorTagHumiditySensor::id))
+ QSensorManager::registerBackend(QHumiditySensor::sensorType, SensorTagHumiditySensor::id, this);
- if (!QSensorManager::isBackendRegistered(QPressureSensor::type, SensorTagPressureSensor::id))
- QSensorManager::registerBackend(QPressureSensor::type, SensorTagPressureSensor::id, this);
+ if (!QSensorManager::isBackendRegistered(QPressureSensor::sensorType, SensorTagPressureSensor::id))
+ QSensorManager::registerBackend(QPressureSensor::sensorType, SensorTagPressureSensor::id, this);
- if (!QSensorManager::isBackendRegistered(QGyroscope::type, SensorTagGyroscope::id))
- QSensorManager::registerBackend(QGyroscope::type, SensorTagGyroscope::id, this);
+ if (!QSensorManager::isBackendRegistered(QGyroscope::sensorType, SensorTagGyroscope::id))
+ QSensorManager::registerBackend(QGyroscope::sensorType, SensorTagGyroscope::id, this);
- if (!QSensorManager::isBackendRegistered(QMagnetometer::type, SensorTagMagnetometer::id))
- QSensorManager::registerBackend(QMagnetometer::type, SensorTagMagnetometer::id, this);
+ if (!QSensorManager::isBackendRegistered(QMagnetometer::sensorType, SensorTagMagnetometer::id))
+ QSensorManager::registerBackend(QMagnetometer::sensorType, SensorTagMagnetometer::id, this);
}
QSensorBackend *createBackend(QSensor *sensor)
diff --git a/src/plugins/sensors/winrt/main.cpp b/src/plugins/sensors/winrt/main.cpp
index cae34037..e66e0ade 100644
--- a/src/plugins/sensors/winrt/main.cpp
+++ b/src/plugins/sensors/winrt/main.cpp
@@ -62,12 +62,12 @@ public:
void registerSensors() override
{
- QSensorManager::registerBackend(QAccelerometer::type, QByteArrayLiteral("WinRtAccelerometer"), this);
- QSensorManager::registerBackend(QCompass::type, QByteArrayLiteral("WinRtCompass"), this);
- QSensorManager::registerBackend(QGyroscope::type, QByteArrayLiteral("WinRtGyroscope"), this);
- QSensorManager::registerBackend(QRotationSensor::type, QByteArrayLiteral("WinRtRotationSensor"), this);
- QSensorManager::registerBackend(QAmbientLightSensor::type, QByteArrayLiteral("WinRtAmbientLightSensor"), this);
- QSensorManager::registerBackend(QOrientationSensor::type, QByteArrayLiteral("WinRtOrientationSensor"), this);
+ QSensorManager::registerBackend(QAccelerometer::sensorType, QByteArrayLiteral("WinRtAccelerometer"), this);
+ QSensorManager::registerBackend(QCompass::sensorType, QByteArrayLiteral("WinRtCompass"), this);
+ QSensorManager::registerBackend(QGyroscope::sensorType, QByteArrayLiteral("WinRtGyroscope"), this);
+ QSensorManager::registerBackend(QRotationSensor::sensorType, QByteArrayLiteral("WinRtRotationSensor"), this);
+ QSensorManager::registerBackend(QAmbientLightSensor::sensorType, QByteArrayLiteral("WinRtAmbientLightSensor"), this);
+ QSensorManager::registerBackend(QOrientationSensor::sensorType, QByteArrayLiteral("WinRtOrientationSensor"), this);
}
QSensorBackend *createBackend(QSensor *sensor) override
diff --git a/src/sensors/doc/snippets/sensors/creating.cpp b/src/sensors/doc/snippets/sensors/creating.cpp
index be2070dd..355d950f 100644
--- a/src/sensors/doc/snippets/sensors/creating.cpp
+++ b/src/sensors/doc/snippets/sensors/creating.cpp
@@ -69,7 +69,7 @@ Q_UNUSED(magnetometer);
{
//! [3]
-QSensor *magnetometer = new QSensor(QMagnetometer::type, this);
+QSensor *magnetometer = new QSensor(QMagnetometer::sensorType, this);
//! [3]
Q_UNUSED(magnetometer);
}
diff --git a/src/sensors/doc/snippets/sensors/plugin.cpp b/src/sensors/doc/snippets/sensors/plugin.cpp
index 1eef5966..47435a8f 100644
--- a/src/sensors/doc/snippets/sensors/plugin.cpp
+++ b/src/sensors/doc/snippets/sensors/plugin.cpp
@@ -52,7 +52,7 @@ class MyPluginClass : public QObject, public QSensorPluginInterface, public QSen
public:
void registerSensors() override
{
- QSensorManager::registerBackend(QAccelerometer::type, MyBackend::id, this);
+ QSensorManager::registerBackend(QAccelerometer::sensorType, MyBackend::id, this);
}
QSensorBackend *createBackend(QSensor *sensor) override
diff --git a/src/sensors/doc/src/qt6-changes.qdoc b/src/sensors/doc/src/qt6-changes.qdoc
index e4447a2f..e68aab3e 100644
--- a/src/sensors/doc/src/qt6-changes.qdoc
+++ b/src/sensors/doc/src/qt6-changes.qdoc
@@ -52,4 +52,13 @@
The typedef for the historical, QtMobility-era, 'qtimestamp' has been
removed. Use the actual type 'quint64' directly.
+
+ \section2 Renamed 'sensor' type string to 'sensorType'
+
+ The subclasses of QSensor implement a \e {char const*} string which defines
+ the string that identifies the base sensor. This static \e type field
+ shadowed the baseclass \l QSensor::type() method, leading to unnecessary
+ compilation errors and consequent workarounds. The \e type string has been
+ now renamed as \e sensorType.
+
*/
diff --git a/src/sensors/make_sensor.pl b/src/sensors/make_sensor.pl
index bfa81472..5f9a6e62 100755
--- a/src/sensors/make_sensor.pl
+++ b/src/sensors/make_sensor.pl
@@ -323,7 +323,7 @@ public:
explicit '.$sensor.'(QObject *parent = 0);
~'.$sensor.'();
'.$reading.' *reading() const;
- static char const * const type;
+ static char const * const sensorType;
private:
Q_DISABLE_COPY('.$sensor.')
@@ -410,7 +410,7 @@ bool '.$filter.'::filter(QSensorReading *reading)
return filter(static_cast<'.$reading.'*>(reading));
}
-char const * const '.$sensor.'::type("'.$sensor.'");
+char const * const '.$sensor.'::sensorType("'.$sensor.'");
/*!
\class '.$sensor.'
@@ -433,7 +433,7 @@ char const * const '.$sensor.'::type("'.$sensor.'");
Construct the sensor as a child of \a parent.
*/
'.$sensor.'::'.$sensor.'(QObject *parent)
- : QSensor('.$sensor.'::type, parent)
+ : QSensor('.$sensor.'::sensorType, parent)
{
}
@@ -473,4 +473,3 @@ sub get_arg
}
return shift(@ARGV);
}
-
diff --git a/src/sensors/qaccelerometer.cpp b/src/sensors/qaccelerometer.cpp
index 4f89f997..a2603401 100644
--- a/src/sensors/qaccelerometer.cpp
+++ b/src/sensors/qaccelerometer.cpp
@@ -155,7 +155,7 @@ bool QAccelerometerFilter::filter(QSensorReading *reading)
return filter(static_cast<QAccelerometerReading*>(reading));
}
-char const * const QAccelerometer::type("QAccelerometer");
+char const * const QAccelerometer::sensorType("QAccelerometer");
/*!
\enum QAccelerometer::AccelerationMode
@@ -205,7 +205,7 @@ char const * const QAccelerometer::type("QAccelerometer");
Construct the sensor as a child of \a parent.
*/
QAccelerometer::QAccelerometer(QObject *parent)
- : QSensor(QAccelerometer::type, *new QAccelerometerPrivate, parent)
+ : QSensor(QAccelerometer::sensorType, *new QAccelerometerPrivate, parent)
{
}
diff --git a/src/sensors/qaccelerometer.h b/src/sensors/qaccelerometer.h
index a44971f2..92c58167 100644
--- a/src/sensors/qaccelerometer.h
+++ b/src/sensors/qaccelerometer.h
@@ -95,7 +95,7 @@ public:
void setAccelerationMode(AccelerationMode accelerationMode);
QAccelerometerReading *reading() const;
- static char const * const type;
+ static char const * const sensorType;
Q_SIGNALS:
void accelerationModeChanged(AccelerationMode accelerationMode);
diff --git a/src/sensors/qaltimeter.cpp b/src/sensors/qaltimeter.cpp
index 7092870d..ddac14e0 100644
--- a/src/sensors/qaltimeter.cpp
+++ b/src/sensors/qaltimeter.cpp
@@ -99,7 +99,7 @@ bool QAltimeterFilter::filter(QSensorReading *reading)
return filter(static_cast<QAltimeterReading*>(reading));
}
-char const * const QAltimeter::type("QAltimeter");
+char const * const QAltimeter::sensorType("QAltimeter");
/*!
\class QAltimeter
@@ -122,7 +122,7 @@ char const * const QAltimeter::type("QAltimeter");
Construct the sensor as a child of \a parent.
*/
QAltimeter::QAltimeter(QObject *parent)
- : QSensor(QAltimeter::type, parent)
+ : QSensor(QAltimeter::sensorType, parent)
{
}
diff --git a/src/sensors/qaltimeter.h b/src/sensors/qaltimeter.h
index 50c9e83b..cf02c115 100644
--- a/src/sensors/qaltimeter.h
+++ b/src/sensors/qaltimeter.h
@@ -70,7 +70,7 @@ public:
explicit QAltimeter(QObject *parent = Q_NULLPTR);
~QAltimeter();
QAltimeterReading *reading() const;
- static char const * const type;
+ static char const * const sensorType;
private:
Q_DISABLE_COPY(QAltimeter)
diff --git a/src/sensors/qambientlightsensor.cpp b/src/sensors/qambientlightsensor.cpp
index dd86ae2e..3d5c2455 100644
--- a/src/sensors/qambientlightsensor.cpp
+++ b/src/sensors/qambientlightsensor.cpp
@@ -131,7 +131,7 @@ bool QAmbientLightFilter::filter(QSensorReading *reading)
return filter(static_cast<QAmbientLightReading*>(reading));
}
-char const * const QAmbientLightSensor::type("QAmbientLightSensor");
+char const * const QAmbientLightSensor::sensorType("QAmbientLightSensor");
/*!
\class QAmbientLightSensor
@@ -154,7 +154,7 @@ char const * const QAmbientLightSensor::type("QAmbientLightSensor");
Construct the sensor as a child of \a parent.
*/
QAmbientLightSensor::QAmbientLightSensor(QObject *parent)
- : QSensor(QAmbientLightSensor::type, parent)
+ : QSensor(QAmbientLightSensor::sensorType, parent)
{
}
diff --git a/src/sensors/qambientlightsensor.h b/src/sensors/qambientlightsensor.h
index 9d1acec9..b41fd71e 100644
--- a/src/sensors/qambientlightsensor.h
+++ b/src/sensors/qambientlightsensor.h
@@ -81,7 +81,7 @@ public:
explicit QAmbientLightSensor(QObject *parent = Q_NULLPTR);
virtual ~QAmbientLightSensor();
QAmbientLightReading *reading() const;
- static char const * const type;
+ static char const * const sensorType;
private:
Q_DISABLE_COPY(QAmbientLightSensor)
diff --git a/src/sensors/qambienttemperaturesensor.cpp b/src/sensors/qambienttemperaturesensor.cpp
index 53cce0a9..ff973300 100644
--- a/src/sensors/qambienttemperaturesensor.cpp
+++ b/src/sensors/qambienttemperaturesensor.cpp
@@ -101,7 +101,7 @@ bool QAmbientTemperatureFilter::filter(QSensorReading *reading)
return filter(static_cast<QAmbientTemperatureReading*>(reading));
}
-char const * const QAmbientTemperatureSensor::type("QAmbientTemperatureSensor");
+char const * const QAmbientTemperatureSensor::sensorType("QAmbientTemperatureSensor");
/*!
\class QAmbientTemperatureSensor
@@ -124,7 +124,7 @@ char const * const QAmbientTemperatureSensor::type("QAmbientTemperatureSensor");
Construct the sensor as a child of \a parent.
*/
QAmbientTemperatureSensor::QAmbientTemperatureSensor(QObject *parent)
- : QSensor(QAmbientTemperatureSensor::type, parent)
+ : QSensor(QAmbientTemperatureSensor::sensorType, parent)
{
}
diff --git a/src/sensors/qambienttemperaturesensor.h b/src/sensors/qambienttemperaturesensor.h
index 4198b15a..b048c200 100644
--- a/src/sensors/qambienttemperaturesensor.h
+++ b/src/sensors/qambienttemperaturesensor.h
@@ -70,7 +70,7 @@ public:
explicit QAmbientTemperatureSensor(QObject *parent = Q_NULLPTR);
~QAmbientTemperatureSensor();
QAmbientTemperatureReading *reading() const;
- static char const * const type;
+ static char const * const sensorType;
private:
Q_DISABLE_COPY(QAmbientTemperatureSensor)
diff --git a/src/sensors/qcompass.cpp b/src/sensors/qcompass.cpp
index 5bd2101b..adbd0f1d 100644
--- a/src/sensors/qcompass.cpp
+++ b/src/sensors/qcompass.cpp
@@ -141,7 +141,7 @@ bool QCompassFilter::filter(QSensorReading *reading)
return filter(static_cast<QCompassReading*>(reading));
}
-char const * const QCompass::type("QCompass");
+char const * const QCompass::sensorType("QCompass");
/*!
\class QCompass
@@ -164,7 +164,7 @@ char const * const QCompass::type("QCompass");
Construct the sensor as a child of \a parent.
*/
QCompass::QCompass(QObject *parent)
- : QSensor(QCompass::type, parent)
+ : QSensor(QCompass::sensorType, parent)
{
}
diff --git a/src/sensors/qcompass.h b/src/sensors/qcompass.h
index 0d22c746..39812c1b 100644
--- a/src/sensors/qcompass.h
+++ b/src/sensors/qcompass.h
@@ -75,7 +75,7 @@ public:
explicit QCompass(QObject *parent = Q_NULLPTR);
virtual ~QCompass();
QCompassReading *reading() const;
- static char const * const type;
+ static char const * const sensorType;
private:
Q_DISABLE_COPY(QCompass)
diff --git a/src/sensors/qdistancesensor.cpp b/src/sensors/qdistancesensor.cpp
index 916218f8..3b778b90 100644
--- a/src/sensors/qdistancesensor.cpp
+++ b/src/sensors/qdistancesensor.cpp
@@ -111,7 +111,7 @@ bool QDistanceFilter::filter(QSensorReading *reading)
return filter(static_cast<QDistanceReading*>(reading));
}
-char const * const QDistanceSensor::type("QDistanceSensor");
+char const * const QDistanceSensor::sensorType("QDistanceSensor");
/*!
\class QDistanceSensor
@@ -134,7 +134,7 @@ char const * const QDistanceSensor::type("QDistanceSensor");
Construct the sensor as a child of \a parent.
*/
QDistanceSensor::QDistanceSensor(QObject *parent)
- : QSensor(QDistanceSensor::type, parent)
+ : QSensor(QDistanceSensor::sensorType, parent)
{
}
diff --git a/src/sensors/qdistancesensor.h b/src/sensors/qdistancesensor.h
index a6aef947..a7b40872 100644
--- a/src/sensors/qdistancesensor.h
+++ b/src/sensors/qdistancesensor.h
@@ -71,7 +71,7 @@ public:
explicit QDistanceSensor(QObject *parent = Q_NULLPTR);
~QDistanceSensor();
QDistanceReading *reading() const;
- static char const * const type;
+ static char const * const sensorType;
private:
Q_DISABLE_COPY(QDistanceSensor)
diff --git a/src/sensors/qgyroscope.cpp b/src/sensors/qgyroscope.cpp
index 585da99b..5c4a3982 100644
--- a/src/sensors/qgyroscope.cpp
+++ b/src/sensors/qgyroscope.cpp
@@ -153,7 +153,7 @@ bool QGyroscopeFilter::filter(QSensorReading *reading)
return filter(static_cast<QGyroscopeReading*>(reading));
}
-char const * const QGyroscope::type("QGyroscope");
+char const * const QGyroscope::sensorType("QGyroscope");
/*!
\class QGyroscope
@@ -176,7 +176,7 @@ char const * const QGyroscope::type("QGyroscope");
Construct the sensor as a child of \a parent.
*/
QGyroscope::QGyroscope(QObject *parent)
- : QSensor(QGyroscope::type, parent)
+ : QSensor(QGyroscope::sensorType, parent)
{
}
diff --git a/src/sensors/qgyroscope.h b/src/sensors/qgyroscope.h
index 7d7e287e..3c335dfe 100644
--- a/src/sensors/qgyroscope.h
+++ b/src/sensors/qgyroscope.h
@@ -79,7 +79,7 @@ public:
explicit QGyroscope(QObject *parent = Q_NULLPTR);
virtual ~QGyroscope();
QGyroscopeReading *reading() const;
- static char const * const type;
+ static char const * const sensorType;
private:
Q_DISABLE_COPY(QGyroscope)
diff --git a/src/sensors/qholstersensor.cpp b/src/sensors/qholstersensor.cpp
index 8bb14748..19a2b3c9 100644
--- a/src/sensors/qholstersensor.cpp
+++ b/src/sensors/qholstersensor.cpp
@@ -105,7 +105,7 @@ bool QHolsterFilter::filter(QSensorReading *reading)
return filter(static_cast<QHolsterReading*>(reading));
}
-char const * const QHolsterSensor::type("QHolsterSensor");
+char const * const QHolsterSensor::sensorType("QHolsterSensor");
/*!
\class QHolsterSensor
@@ -128,7 +128,7 @@ char const * const QHolsterSensor::type("QHolsterSensor");
Construct the sensor as a child of \a parent.
*/
QHolsterSensor::QHolsterSensor(QObject *parent)
- : QSensor(QHolsterSensor::type, parent)
+ : QSensor(QHolsterSensor::sensorType, parent)
{
}
diff --git a/src/sensors/qholstersensor.h b/src/sensors/qholstersensor.h
index 43d02899..9a48fbf3 100644
--- a/src/sensors/qholstersensor.h
+++ b/src/sensors/qholstersensor.h
@@ -70,7 +70,7 @@ public:
explicit QHolsterSensor(QObject *parent = Q_NULLPTR);
~QHolsterSensor();
QHolsterReading *reading() const;
- static char const * const type;
+ static char const * const sensorType;
private:
Q_DISABLE_COPY(QHolsterSensor)
diff --git a/src/sensors/qhumiditysensor.cpp b/src/sensors/qhumiditysensor.cpp
index e566c6a6..d2041548 100644
--- a/src/sensors/qhumiditysensor.cpp
+++ b/src/sensors/qhumiditysensor.cpp
@@ -129,7 +129,7 @@ bool QHumidityFilter::filter(QSensorReading *reading)
return filter(static_cast<QHumidityReading*>(reading));
}
-char const * const QHumiditySensor::type("QHumiditySensor");
+char const * const QHumiditySensor::sensorType("QHumiditySensor");
/*!
@@ -153,7 +153,7 @@ char const * const QHumiditySensor::type("QHumiditySensor");
Construct the sensor as a child of \a parent.
*/
QHumiditySensor::QHumiditySensor(QObject *parent)
- : QSensor(QHumiditySensor::type, parent)
+ : QSensor(QHumiditySensor::sensorType, parent)
{
}
diff --git a/src/sensors/qhumiditysensor.h b/src/sensors/qhumiditysensor.h
index f24d2be2..aa51df45 100644
--- a/src/sensors/qhumiditysensor.h
+++ b/src/sensors/qhumiditysensor.h
@@ -79,7 +79,7 @@ public:
~QHumiditySensor();
QHumidityReading *reading() const;
- static char const * const type;
+ static char const * const sensorType;
private:
Q_DECLARE_PRIVATE(QHumiditySensor)
diff --git a/src/sensors/qirproximitysensor.cpp b/src/sensors/qirproximitysensor.cpp
index 2be5a43a..85c8347e 100644
--- a/src/sensors/qirproximitysensor.cpp
+++ b/src/sensors/qirproximitysensor.cpp
@@ -121,7 +121,7 @@ bool QIRProximityFilter::filter(QSensorReading *reading)
return filter(static_cast<QIRProximityReading*>(reading));
}
-char const * const QIRProximitySensor::type("QIRProximitySensor");
+char const * const QIRProximitySensor::sensorType("QIRProximitySensor");
/*!
\class QIRProximitySensor
@@ -144,7 +144,7 @@ char const * const QIRProximitySensor::type("QIRProximitySensor");
Construct the sensor as a child of \a parent.
*/
QIRProximitySensor::QIRProximitySensor(QObject *parent)
- : QSensor(QIRProximitySensor::type, parent)
+ : QSensor(QIRProximitySensor::sensorType, parent)
{
}
diff --git a/src/sensors/qirproximitysensor.h b/src/sensors/qirproximitysensor.h
index 2941d6e0..aeaf9467 100644
--- a/src/sensors/qirproximitysensor.h
+++ b/src/sensors/qirproximitysensor.h
@@ -71,7 +71,7 @@ public:
explicit QIRProximitySensor(QObject *parent = Q_NULLPTR);
virtual ~QIRProximitySensor();
QIRProximityReading *reading() const;
- static char const * const type;
+ static char const * const sensorType;
private:
Q_DISABLE_COPY(QIRProximitySensor)
diff --git a/src/sensors/qlidsensor.cpp b/src/sensors/qlidsensor.cpp
index 893987b7..d46daa49 100644
--- a/src/sensors/qlidsensor.cpp
+++ b/src/sensors/qlidsensor.cpp
@@ -130,7 +130,7 @@ bool QLidFilter::filter(QSensorReading *reading)
return filter(static_cast<QLidReading*>(reading));
}
-char const * const QLidSensor::type("QLidSensor");
+char const * const QLidSensor::sensorType("QLidSensor");
/*!
\class QLidSensor
@@ -154,7 +154,7 @@ char const * const QLidSensor::type("QLidSensor");
Construct the sensor as a child of \a parent.
*/
QLidSensor::QLidSensor(QObject *parent)
- : QSensor(QLidSensor::type, parent)
+ : QSensor(QLidSensor::sensorType, parent)
{
}
diff --git a/src/sensors/qlidsensor.h b/src/sensors/qlidsensor.h
index f7992cac..3182e84e 100644
--- a/src/sensors/qlidsensor.h
+++ b/src/sensors/qlidsensor.h
@@ -79,7 +79,7 @@ public:
explicit QLidSensor(QObject *parent = Q_NULLPTR);
~QLidSensor();
QLidReading *reading() const;
- static char const * const type;
+ static char const * const sensorType;
private:
Q_DISABLE_COPY(QLidSensor)
diff --git a/src/sensors/qlightsensor.cpp b/src/sensors/qlightsensor.cpp
index efff15f9..a4e88ea5 100644
--- a/src/sensors/qlightsensor.cpp
+++ b/src/sensors/qlightsensor.cpp
@@ -105,7 +105,7 @@ bool QLightFilter::filter(QSensorReading *reading)
return filter(static_cast<QLightReading*>(reading));
}
-char const * const QLightSensor::type("QLightSensor");
+char const * const QLightSensor::sensorType("QLightSensor");
/*!
\class QLightSensor
@@ -128,7 +128,7 @@ char const * const QLightSensor::type("QLightSensor");
Construct the sensor as a child of \a parent.
*/
QLightSensor::QLightSensor(QObject *parent)
- : QSensor(QLightSensor::type, *new QLightSensorPrivate, parent)
+ : QSensor(QLightSensor::sensorType, *new QLightSensorPrivate, parent)
{
}
diff --git a/src/sensors/qlightsensor.h b/src/sensors/qlightsensor.h
index 03f1871e..642d79cf 100644
--- a/src/sensors/qlightsensor.h
+++ b/src/sensors/qlightsensor.h
@@ -74,7 +74,7 @@ public:
explicit QLightSensor(QObject *parent = Q_NULLPTR);
virtual ~QLightSensor();
QLightReading *reading() const;
- static char const * const type;
+ static char const * const sensorType;
qreal fieldOfView() const;
void setFieldOfView(qreal fieldOfView);
diff --git a/src/sensors/qmagnetometer.cpp b/src/sensors/qmagnetometer.cpp
index ac2231ec..b92acfea 100644
--- a/src/sensors/qmagnetometer.cpp
+++ b/src/sensors/qmagnetometer.cpp
@@ -199,7 +199,7 @@ bool QMagnetometerFilter::filter(QSensorReading *reading)
return filter(static_cast<QMagnetometerReading*>(reading));
}
-char const * const QMagnetometer::type("QMagnetometer");
+char const * const QMagnetometer::sensorType("QMagnetometer");
/*!
\class QMagnetometer
@@ -222,7 +222,7 @@ char const * const QMagnetometer::type("QMagnetometer");
Construct the sensor as a child of \a parent.
*/
QMagnetometer::QMagnetometer(QObject *parent)
- : QSensor(QMagnetometer::type, *new QMagnetometerPrivate, parent)
+ : QSensor(QMagnetometer::sensorType, *new QMagnetometerPrivate, parent)
{
}
diff --git a/src/sensors/qmagnetometer.h b/src/sensors/qmagnetometer.h
index f8b0fbfb..e1ed9ede 100644
--- a/src/sensors/qmagnetometer.h
+++ b/src/sensors/qmagnetometer.h
@@ -86,7 +86,7 @@ public:
explicit QMagnetometer(QObject *parent = Q_NULLPTR);
virtual ~QMagnetometer();
QMagnetometerReading *reading() const;
- static char const * const type;
+ static char const * const sensorType;
bool returnGeoValues() const;
void setReturnGeoValues(bool returnGeoValues);
diff --git a/src/sensors/qorientationsensor.cpp b/src/sensors/qorientationsensor.cpp
index 91d10749..29a493ab 100644
--- a/src/sensors/qorientationsensor.cpp
+++ b/src/sensors/qorientationsensor.cpp
@@ -154,7 +154,7 @@ bool QOrientationFilter::filter(QSensorReading *reading)
return filter(static_cast<QOrientationReading*>(reading));
}
-char const * const QOrientationSensor::type("QOrientationSensor");
+char const * const QOrientationSensor::sensorType("QOrientationSensor");
/*!
\class QOrientationSensor
@@ -177,7 +177,7 @@ char const * const QOrientationSensor::type("QOrientationSensor");
Construct the sensor as a child of \a parent.
*/
QOrientationSensor::QOrientationSensor(QObject *parent)
- : QSensor(QOrientationSensor::type, parent)
+ : QSensor(QOrientationSensor::sensorType, parent)
{
}
diff --git a/src/sensors/qorientationsensor.h b/src/sensors/qorientationsensor.h
index 89823ca2..1a54d800 100644
--- a/src/sensors/qorientationsensor.h
+++ b/src/sensors/qorientationsensor.h
@@ -82,7 +82,7 @@ public:
explicit QOrientationSensor(QObject *parent = Q_NULLPTR);
virtual ~QOrientationSensor();
QOrientationReading *reading() const;
- static char const * const type;
+ static char const * const sensorType;
private:
Q_DISABLE_COPY(QOrientationSensor)
diff --git a/src/sensors/qpressuresensor.cpp b/src/sensors/qpressuresensor.cpp
index 643f1fa1..6e83315c 100644
--- a/src/sensors/qpressuresensor.cpp
+++ b/src/sensors/qpressuresensor.cpp
@@ -131,7 +131,7 @@ bool QPressureFilter::filter(QSensorReading *reading)
return filter(static_cast<QPressureReading*>(reading));
}
-char const * const QPressureSensor::type("QPressureSensor");
+char const * const QPressureSensor::sensorType("QPressureSensor");
/*!
\class QPressureSensor
@@ -154,7 +154,7 @@ char const * const QPressureSensor::type("QPressureSensor");
Construct the sensor as a child of \a parent.
*/
QPressureSensor::QPressureSensor(QObject *parent)
- : QSensor(QPressureSensor::type, parent)
+ : QSensor(QPressureSensor::sensorType, parent)
{
}
diff --git a/src/sensors/qpressuresensor.h b/src/sensors/qpressuresensor.h
index 29ac235f..9b9ebce0 100644
--- a/src/sensors/qpressuresensor.h
+++ b/src/sensors/qpressuresensor.h
@@ -74,7 +74,7 @@ public:
explicit QPressureSensor(QObject *parent = Q_NULLPTR);
~QPressureSensor();
QPressureReading *reading() const;
- static char const * const type;
+ static char const * const sensorType;
private:
Q_DISABLE_COPY(QPressureSensor)
diff --git a/src/sensors/qproximitysensor.cpp b/src/sensors/qproximitysensor.cpp
index b568e6cd..37114444 100644
--- a/src/sensors/qproximitysensor.cpp
+++ b/src/sensors/qproximitysensor.cpp
@@ -110,7 +110,7 @@ bool QProximityFilter::filter(QSensorReading *reading)
return filter(static_cast<QProximityReading*>(reading));
}
-char const * const QProximitySensor::type("QProximitySensor");
+char const * const QProximitySensor::sensorType("QProximitySensor");
/*!
\class QProximitySensor
@@ -133,7 +133,7 @@ char const * const QProximitySensor::type("QProximitySensor");
Construct the sensor as a child of \a parent.
*/
QProximitySensor::QProximitySensor(QObject *parent)
- : QSensor(QProximitySensor::type, parent)
+ : QSensor(QProximitySensor::sensorType, parent)
{
}
diff --git a/src/sensors/qproximitysensor.h b/src/sensors/qproximitysensor.h
index 46a8b218..2c2829eb 100644
--- a/src/sensors/qproximitysensor.h
+++ b/src/sensors/qproximitysensor.h
@@ -71,7 +71,7 @@ public:
explicit QProximitySensor(QObject *parent = Q_NULLPTR);
virtual ~QProximitySensor();
QProximityReading *reading() const;
- static char const * const type;
+ static char const * const sensorType;
private:
Q_DISABLE_COPY(QProximitySensor)
diff --git a/src/sensors/qrotationsensor.cpp b/src/sensors/qrotationsensor.cpp
index 44424b50..ab6c2ace 100644
--- a/src/sensors/qrotationsensor.cpp
+++ b/src/sensors/qrotationsensor.cpp
@@ -184,7 +184,7 @@ bool QRotationFilter::filter(QSensorReading *reading)
return filter(static_cast<QRotationReading*>(reading));
}
-char const * const QRotationSensor::type("QRotationSensor");
+char const * const QRotationSensor::sensorType("QRotationSensor");
/*!
\class QRotationSensor
@@ -207,7 +207,7 @@ char const * const QRotationSensor::type("QRotationSensor");
Construct the sensor as a child of \a parent.
*/
QRotationSensor::QRotationSensor(QObject *parent)
- : QSensor(QRotationSensor::type, *new QRotationSensorPrivate, parent)
+ : QSensor(QRotationSensor::sensorType, *new QRotationSensorPrivate, parent)
{
}
diff --git a/src/sensors/qrotationsensor.h b/src/sensors/qrotationsensor.h
index d6c43acc..20270ade 100644
--- a/src/sensors/qrotationsensor.h
+++ b/src/sensors/qrotationsensor.h
@@ -79,7 +79,7 @@ public:
explicit QRotationSensor(QObject *parent = Q_NULLPTR);
virtual ~QRotationSensor();
QRotationReading *reading() const;
- static char const * const type;
+ static char const * const sensorType;
bool hasZ() const;
void setHasZ(bool hasZ);
diff --git a/src/sensors/qtapsensor.cpp b/src/sensors/qtapsensor.cpp
index 9889a8c2..dbfcbaa2 100644
--- a/src/sensors/qtapsensor.cpp
+++ b/src/sensors/qtapsensor.cpp
@@ -194,7 +194,7 @@ bool QTapFilter::filter(QSensorReading *reading)
return filter(static_cast<QTapReading*>(reading));
}
-char const * const QTapSensor::type("QTapSensor");
+char const * const QTapSensor::sensorType("QTapSensor");
/*!
\class QTapSensor
@@ -217,7 +217,7 @@ char const * const QTapSensor::type("QTapSensor");
Construct the sensor as a child of \a parent.
*/
QTapSensor::QTapSensor(QObject *parent)
- : QSensor(QTapSensor::type, *new QTapSensorPrivate, parent)
+ : QSensor(QTapSensor::sensorType, *new QTapSensorPrivate, parent)
{
}
diff --git a/src/sensors/qtapsensor.h b/src/sensors/qtapsensor.h
index 31ba67f6..33922f38 100644
--- a/src/sensors/qtapsensor.h
+++ b/src/sensors/qtapsensor.h
@@ -96,7 +96,7 @@ public:
explicit QTapSensor(QObject *parent = Q_NULLPTR);
virtual ~QTapSensor();
QTapReading *reading() const;
- static char const * const type;
+ static char const * const sensorType;
bool returnDoubleTapEvents() const;
void setReturnDoubleTapEvents(bool returnDoubleTapEvents);
diff --git a/src/sensors/qtiltsensor.cpp b/src/sensors/qtiltsensor.cpp
index 310ed36c..a18b59a5 100644
--- a/src/sensors/qtiltsensor.cpp
+++ b/src/sensors/qtiltsensor.cpp
@@ -123,7 +123,7 @@ bool QTiltFilter::filter(QSensorReading *reading)
return filter(static_cast<QTiltReading*>(reading));
}
-char const * const QTiltSensor::type("QTiltSensor");
+char const * const QTiltSensor::sensorType("QTiltSensor");
/*!
\class QTiltSensor
@@ -148,7 +148,7 @@ char const * const QTiltSensor::type("QTiltSensor");
Construct the sensor as a child of \a parent.
*/
QTiltSensor::QTiltSensor(QObject *parent)
- : QSensor(QTiltSensor::type, parent)
+ : QSensor(QTiltSensor::sensorType, parent)
{
}
diff --git a/src/sensors/qtiltsensor.h b/src/sensors/qtiltsensor.h
index 2e0d0a78..9f6532bd 100644
--- a/src/sensors/qtiltsensor.h
+++ b/src/sensors/qtiltsensor.h
@@ -77,7 +77,7 @@ public:
explicit QTiltSensor(QObject *parent = Q_NULLPTR);
~QTiltSensor();
QTiltReading *reading() const;
- static char const * const type;
+ static char const * const sensorType;
Q_INVOKABLE void calibrate();