summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@theqtcompany.com>2015-12-03 12:30:06 +0100
committerMaurice Kalinowski <maurice.kalinowski@theqtcompany.com>2015-12-03 19:10:59 +0000
commitc398c3a93edfdb3e4f9aa4fda7eb1c981333dd03 (patch)
tree8b48bf98ac0a77200a694769e8e091e34a64ff8e
parent13fd3e9611391742b4bea86cb2f4740534daf695 (diff)
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>
-rw-r--r--src/plugins/sensors/generic/generictiltsensor.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/sensors/generic/generictiltsensor.h b/src/plugins/sensors/generic/generictiltsensor.h
index a5a8f428..0f99f555 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;