diff options
author | Lincoln Ramsay <lincoln.ramsay@nokia.com> | 2012-06-19 11:45:09 +1000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-09-26 00:29:37 +0200 |
commit | f9d52ca1c093d8997d44cd8356b43b2665fdbf20 (patch) | |
tree | 45fd29bd91c67794bf3e1aefbf232bbd1d2f7b8f /src/imports/sensors2/qsensor2gesture.cpp | |
parent | 1d253860f9863fd015115d728c3f1bd04c5119c6 (diff) |
QtMobility.sensors has a new implementation
This implementation fixes the limitations the original code had
and separates the QtSensors C++ API from the QML API so that
changes to one don't need to affect the other.
Change-Id: I519463f3c7cfbad3bce5c291ce166b8793d5ed4a
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'src/imports/sensors2/qsensor2gesture.cpp')
-rw-r--r-- | src/imports/sensors2/qsensor2gesture.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/imports/sensors2/qsensor2gesture.cpp b/src/imports/sensors2/qsensor2gesture.cpp index 8356a5c7..d68966cd 100644 --- a/src/imports/sensors2/qsensor2gesture.cpp +++ b/src/imports/sensors2/qsensor2gesture.cpp @@ -160,7 +160,7 @@ void QSensor2Gesture::setGestures(const QStringList& value) _gestures.clear(); _gestures = value; createGesture(); - emit gesturesChanged(); + Q_EMIT gesturesChanged(); } @@ -207,19 +207,19 @@ void QSensor2Gesture::setEnabled(bool value) _oldEnabled = _enabled; if (_sensorGesture){ if (_enabled){ -#ifdef LOGGESTURQMLAPI +#ifdef LOGGESTUREQMLAPI qDebug() << "start detection" << _gestureIds; #endif _sensorGesture->startDetection(); } else { -#ifdef LOGGESTURQMLAPI +#ifdef LOGGESTUREQMLAPI qDebug() << "stop detection" << _gestureIds; #endif _sensorGesture->stopDetection(); } } - emit enabledChanged(); + Q_EMIT enabledChanged(); } } @@ -245,10 +245,10 @@ void QSensor2Gesture::deleteGesture() _sensorGesture = 0; if (emitinvalidchange){ - emit invalidGesturesChanged(); + Q_EMIT invalidGesturesChanged(); } if (emitvalidchange){ - emit validGesturesChanged(); + Q_EMIT validGesturesChanged(); } } } @@ -268,10 +268,10 @@ void QSensor2Gesture::createGesture() , SIGNAL(detected(QString)) , this , SIGNAL(detected(QString))); - emit validGesturesChanged(); + Q_EMIT validGesturesChanged(); } if (!invalidGestures().isEmpty()) - emit invalidGesturesChanged(); + Q_EMIT invalidGesturesChanged(); } /* |