diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2024-02-23 13:01:34 +0100 |
---|---|---|
committer | Ivan Solovev <ivan.solovev@qt.io> | 2024-02-23 14:23:50 +0100 |
commit | 1ba35c800e1e623fdb7c8343b8e2973d38ca1f59 (patch) | |
tree | a27c86b4a019f687714fc4903ae0d886c0a553a5 /src | |
parent | 256cb34a315dfae8206b5e35d15f63b3735296f2 (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
Pick-to: 6.7
Change-Id: I8fb3d8627a2908a828c98c4b6931a391e339978d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/sensorsquick/qmlsensor_p.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sensorsquick/qmlsensor_p.h b/src/sensorsquick/qmlsensor_p.h index bbf3025d..d08d797f 100644 --- a/src/sensorsquick/qmlsensor_p.h +++ b/src/sensorsquick/qmlsensor_p.h @@ -65,7 +65,7 @@ class Q_SENSORSQUICK_EXPORT QmlSensor : public QObject, public QQmlParserStatus 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); |