diff options
Diffstat (limited to 'src/plugins/sensorgestures/qtsensors/qtsensorgesturesensorhandler.cpp')
-rw-r--r-- | src/plugins/sensorgestures/qtsensors/qtsensorgesturesensorhandler.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/sensorgestures/qtsensors/qtsensorgesturesensorhandler.cpp b/src/plugins/sensorgestures/qtsensors/qtsensorgesturesensorhandler.cpp index 676e94f9..028ab041 100644 --- a/src/plugins/sensorgestures/qtsensors/qtsensorgesturesensorhandler.cpp +++ b/src/plugins/sensorgestures/qtsensors/qtsensorgesturesensorhandler.cpp @@ -89,7 +89,7 @@ bool QtSensorGestureSensorHandler::startSensor(SensorGestureSensors sensor) switch (sensor) { case Accel: //accel - if (!accel) { + if (accel == 0x0) { accel = new QAccelerometer(this); ok = accel->connectToBackend(); qoutputrangelist outputranges = accel->outputRanges(); @@ -105,7 +105,7 @@ bool QtSensorGestureSensorHandler::startSensor(SensorGestureSensors sensor) break; case Orientation: //orientation - if (!orientation) { + if (orientation == 0x0) { orientation = new QOrientationSensor(this); ok = orientation->connectToBackend(); connect(orientation,SIGNAL(readingChanged()),this,SLOT(orientationChanged())); @@ -115,7 +115,7 @@ bool QtSensorGestureSensorHandler::startSensor(SensorGestureSensors sensor) break; case Proximity: //proximity - if (!proximity) { + if (proximity == 0x0) { proximity = new QProximitySensor(this); ok = proximity->connectToBackend(); connect(proximity,SIGNAL(readingChanged()),this,SLOT(proximityChanged())); @@ -125,7 +125,7 @@ bool QtSensorGestureSensorHandler::startSensor(SensorGestureSensors sensor) break; case IrProximity: //irproximity - if (!irProx) { + if (irProx == 0x0) { irProx = new QIRProximitySensor(this); ok = irProx->connectToBackend(); connect(irProx,SIGNAL(readingChanged()),this,SLOT(irProximityChanged())); @@ -135,7 +135,7 @@ bool QtSensorGestureSensorHandler::startSensor(SensorGestureSensors sensor) break; case Tap: //dtap - if (!tapSensor) { + if (tapSensor == 0x0) { tapSensor = new QTapSensor(this); ok = tapSensor->connectToBackend(); connect(tapSensor,SIGNAL(readingChanged()),this,SLOT(doubletap())); |