summaryrefslogtreecommitdiffstats
path: root/src/plugins/sensorgestures/qtsensors/qcoversensorgesturerecognizer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/sensorgestures/qtsensors/qcoversensorgesturerecognizer.cpp')
-rw-r--r--src/plugins/sensorgestures/qtsensors/qcoversensorgesturerecognizer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/sensorgestures/qtsensors/qcoversensorgesturerecognizer.cpp b/src/plugins/sensorgestures/qtsensors/qcoversensorgesturerecognizer.cpp
index 47a08f53..5eb06c25 100644
--- a/src/plugins/sensorgestures/qtsensors/qcoversensorgesturerecognizer.cpp
+++ b/src/plugins/sensorgestures/qtsensors/qcoversensorgesturerecognizer.cpp
@@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE
QCoverSensorGestureRecognizer::QCoverSensorGestureRecognizer(QObject *parent) :
QSensorGestureRecognizer(parent),
- detecting(0), lastProx(0), proximityReading(0), active(0)
+ orientationReading(0),lastProx(0), proximityReading(0), active(0), detecting(0)
{
}
@@ -109,6 +109,9 @@ bool QCoverSensorGestureRecognizer::isActive()
void QCoverSensorGestureRecognizer::proximityChanged(QIRProximityReading *reading)
{
+ if (orientationReading == 0)
+ return;
+
proximityReading = reading->reflectance();
qreal difference = lastProx - proximityReading;