summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas McGuire <thomas.mcguire.qnx@kdab.com>2012-06-28 15:14:53 +0200
committerQt by Nokia <qt-info@nokia.com>2012-06-29 01:23:08 +0200
commit863353e0aad4d3f51860287f727d4b4f58a57e2d (patch)
treead72c584d0f90e7ef4e893dc1a0dfcedf0c52492 /src
parente25adc633f5bf8fd8df1ea89015849850c7a5401 (diff)
Blackberry: Don't use hardcoded sensor IDs
Change-Id: I8a5e6995e735cd7d80e24c9462f144b75a177d5a Reviewed-by: Kevin Ottens <kevin.ottens.qnx@kdab.com> Reviewed-by: Adam Parco <aparco@rim.com> Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/sensors/blackberry/main.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/sensors/blackberry/main.cpp b/src/plugins/sensors/blackberry/main.cpp
index daf74442..c0d1f1d9 100644
--- a/src/plugins/sensors/blackberry/main.cpp
+++ b/src/plugins/sensors/blackberry/main.cpp
@@ -65,7 +65,7 @@ static const char *bbOrientationSensorId = "bbOrientationSensor";
static const char *bbPressureSensorId = "bbPressureSensor";
static const char *bbProximitySensorId = "bbProximitySensor";
static const char *bbRotationSensorId = "bbRotationSensor";
-static const char *bbTemperatureSensorId = "bbTemperatureSensorId";
+static const char *bbTemperatureSensorId = "bbTemperatureSensor";
class BbSensorPlugin : public QObject, public QSensorPluginInterface, public QSensorBackendFactory
{
@@ -77,27 +77,27 @@ public:
void registerSensors()
{
if (sensorSupported(BbAccelerometer::devicePath()))
- QSensorManager::registerBackend("QAccelerometer", bbAccelerometerId, this);
+ QSensorManager::registerBackend(QAccelerometer::type, bbAccelerometerId, this);
if (sensorSupported(BbAltimeter::devicePath()))
QSensorManager::registerBackend("BbAltimeter", bbAltitmeterId, this);
if (sensorSupported(BbCompass::devicePath()))
- QSensorManager::registerBackend("BbCompass", bbCompassId, this);
+ QSensorManager::registerBackend(QCompass::type, bbCompassId, this);
if (sensorSupported(BbGyroscope::devicePath()))
- QSensorManager::registerBackend("QGyroscope", bbGyroscopeId, this);
+ QSensorManager::registerBackend(QGyroscope::type, bbGyroscopeId, this);
if (sensorSupported(BbIRProximitySensor::devicePath()))
- QSensorManager::registerBackend("QIRProximitySensor", bbIRProximitySensorId, this);
+ QSensorManager::registerBackend(QIRProximitySensor::type, bbIRProximitySensorId, this);
if (sensorSupported(BbLightSensor::devicePath()))
- QSensorManager::registerBackend("QLightSensor", bbLightSensorId, this);
+ QSensorManager::registerBackend(QLightSensor::type, bbLightSensorId, this);
if (sensorSupported(BbMagnetometer::devicePath()))
- QSensorManager::registerBackend("QMagnetometer", bbMagnetometerId, this);
+ QSensorManager::registerBackend(QMagnetometer::type, bbMagnetometerId, this);
if (sensorSupported(BbOrientationSensor::devicePath()))
- QSensorManager::registerBackend("QOrientationSensor", bbOrientationSensorId, this);
+ QSensorManager::registerBackend(QOrientationSensor::type, bbOrientationSensorId, this);
if (sensorSupported(BbPressureSensor::devicePath()))
QSensorManager::registerBackend("BbPressureSensor", bbPressureSensorId, this);
if (sensorSupported(BbProximitySensor::devicePath()))
- QSensorManager::registerBackend("QProximitySensor", bbProximitySensorId, this);
+ QSensorManager::registerBackend(QProximitySensor::type, bbProximitySensorId, this);
if (sensorSupported(BbRotationSensor::devicePath()))
- QSensorManager::registerBackend("QRotationSensor", bbRotationSensorId, this);
+ QSensorManager::registerBackend(QRotationSensor::type, bbRotationSensorId, this);
if (sensorSupported(BbTemperatureSensor::devicePath()))
QSensorManager::registerBackend("BbTemperatureSensor", bbTemperatureSensorId, this);
}