diff options
author | Lorn Potter <lorn.potter@nokia.com> | 2012-03-12 14:54:21 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-14 00:54:08 +0100 |
commit | 43e4ebecfbd672c887f8f30582c6df45b8065523 (patch) | |
tree | ceb1d53adbf164235e80f84b5d1cbcd0919f701d /src | |
parent | 8f838dce6ee726297230666a9ddfa58c75138665 (diff) |
add some testing for sensorgestureplugins, however feeble.
Change-Id: I4758f401cbf577b2ac7ba772f4897e6334f22900
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/sensors/gestures/qsensorgesturerecognizer.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/sensors/gestures/qsensorgesturerecognizer.cpp b/src/sensors/gestures/qsensorgesturerecognizer.cpp index c558ca5c..4090db3e 100644 --- a/src/sensors/gestures/qsensorgesturerecognizer.cpp +++ b/src/sensors/gestures/qsensorgesturerecognizer.cpp @@ -169,19 +169,34 @@ void QSensorGestureRecognizer::createBackend() } /*! - Calls QSensorGestureRecognizer::start() if the recognizer isn't already running. + Calls QSensorGestureRecognizer::start() if the recognizer isn't already initialized. + This is called by the QSensorGesture object, so please use that instead. + +\sa QSensorGesture::startDetection + */ void QSensorGestureRecognizer::startBackend() { + if (!d_ptr->initialized) { + qWarning() << "Not starting. Gesture Recognizer not initialized"; + return; + } if (d_ptr->count++ == 0) start(); } /*! Calls QSensorGestureRecognizer::stop() if no other clients are using it. + This is called by the QSensorGesture object, so please use that instead. + +\sa QSensorGesture::stopDetection */ void QSensorGestureRecognizer::stopBackend() { + if (!d_ptr->initialized) { + qWarning() << "Not stopping. Gesture Recognizer not initialized"; + return; + } if (--d_ptr->count == 0) stop(); } |