diff options
author | Oliver Wolff <oliver.wolff@theqtcompany.com> | 2015-12-03 12:30:06 +0100 |
---|---|---|
committer | Maurice Kalinowski <maurice.kalinowski@theqtcompany.com> | 2015-12-03 19:10:59 +0000 |
commit | c398c3a93edfdb3e4f9aa4fda7eb1c981333dd03 (patch) | |
tree | 8b48bf98ac0a77200a694769e8e091e34a64ff8e /src/plugins | |
parent | 13fd3e9611391742b4bea86cb2f4740534daf695 (diff) | |
download | qtsensors-c398c3a93edfdb3e4f9aa4fda7eb1c981333dd03.tar.gz |
Make GenericTiltSensor::calibrate known to QMetaObjectv5.6.0-beta1
When using qml calibrating the tilt sensor does not work on WinRT and
Windows Phone without this change.
QmlTiltsensor::calibrate calls QTiltSensor::calibrate which calls
QMetaObject::invokeMethod with "calibrate" on its backend. That causes
the message "No such method QSensorBackend::calibrate()" without this
change. Thus the meta system has to be made aware of that function.
Change-Id: I539c0fb44e20fffb78bf515ba3767dafa3ce4ed6
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/sensors/generic/generictiltsensor.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/sensors/generic/generictiltsensor.h b/src/plugins/sensors/generic/generictiltsensor.h index a5a8f42..0f99f55 100644 --- a/src/plugins/sensors/generic/generictiltsensor.h +++ b/src/plugins/sensors/generic/generictiltsensor.h @@ -42,6 +42,7 @@ QT_BEGIN_NAMESPACE class GenericTiltSensor : public QSensorBackend, public QAccelerometerFilter { + Q_OBJECT public: static char const * const id; @@ -51,7 +52,7 @@ public: void start() Q_DECL_OVERRIDE; void stop() Q_DECL_OVERRIDE; - void calibrate(); + Q_INVOKABLE void calibrate(); bool filter(QAccelerometerReading *reading) Q_DECL_OVERRIDE; |