summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2024-02-23 13:01:34 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-02-23 16:30:11 +0000
commit8b23b30629f15f1cd519e8bf825443e81946bc67 (patch)
treecf14f693ee2868f69d31d7fe3eca81df4b4c2cbb
parent199e7248af224094d7369a6acb64590d1152d87b (diff)
QmlSensor: fix API review comments
- Explicitly specify the underlying type of the Feature enum, so that QML does not need to guess it. - Use Q_REVISION macro on a new Q_INVOKABLE method. Amends f5eae761742c9099b9a8226c11559e61fc63de15 Found during 6.7 QML API review Change-Id: I8fb3d8627a2908a828c98c4b6931a391e339978d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 1ba35c800e1e623fdb7c8343b8e2973d38ca1f59) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/sensorsquick/qmlsensor_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sensorsquick/qmlsensor_p.h b/src/sensorsquick/qmlsensor_p.h
index 0c0a9527..e82444a7 100644
--- a/src/sensorsquick/qmlsensor_p.h
+++ b/src/sensorsquick/qmlsensor_p.h
@@ -65,7 +65,7 @@ class Q_SENSORSQUICK_PRIVATE_EXPORT QmlSensor : public QObject, public QQmlParse
QML_ADDED_IN_VERSION(5,0)
public:
// Keep in sync with QSensor::Feature
- enum Feature {
+ enum Feature : int {
Buffering = QSensor::Buffering,
AlwaysOn = QSensor::AlwaysOn,
GeoValues = QSensor::GeoValues,
@@ -120,7 +120,7 @@ public:
QmlSensorReading *reading() const;
QBindable<QmlSensorReading*> bindableReading() const;
- Q_INVOKABLE bool isFeatureSupported(Feature feature) const;
+ Q_INVOKABLE Q_REVISION(6, 7) bool isFeatureSupported(Feature feature) const;
AxesOrientationMode axesOrientationMode() const;
void setAxesOrientationMode(AxesOrientationMode axesOrientationMode);