From 25a220dd7370acdf04ee8f6d2d59f25d81cf42c7 Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Tue, 1 Oct 2019 13:06:49 +0200 Subject: Fix 5.14 QML API inconsistencies Change-Id: I54bf3791d3d5e40fb9405c2f1527758fcfba8120 Fixes: QTBUG-78690 Reviewed-by: Alex Blasche --- .../declarativemaps/qdeclarativegeomap.cpp | 2 +- src/location/labs/qdeclarativenavigator.cpp | 27 ++++++++++++++++++++++ .../qdeclarativepositionsource_p.h | 4 ++-- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/src/location/declarativemaps/qdeclarativegeomap.cpp b/src/location/declarativemaps/qdeclarativegeomap.cpp index 4704dc3e..9a46875e 100644 --- a/src/location/declarativemaps/qdeclarativegeomap.cpp +++ b/src/location/declarativemaps/qdeclarativegeomap.cpp @@ -1303,7 +1303,7 @@ QGeoCoordinate QDeclarativeGeoMap::center() const \l zoomLevel of the map. Any previously set value to those properties will be overridden. - This property does not provide any change notifications. + \note Since Qt 5.14 This property provides change notifications. \since 5.6 */ diff --git a/src/location/labs/qdeclarativenavigator.cpp b/src/location/labs/qdeclarativenavigator.cpp index ae273774..b266779c 100644 --- a/src/location/labs/qdeclarativenavigator.cpp +++ b/src/location/labs/qdeclarativenavigator.cpp @@ -157,6 +157,33 @@ QT_BEGIN_NAMESPACE value of this property is plugin dependent. */ +/*! + \qmlproperty bool Qt.labs.location::Navigator::automaticReroutingEnabled + + This property tells whether the Navigator should automatically recalculate + the route when the position from \l positionSource ends too far from the route. + The operation performed in such case is equivalent to calling \l recalculateRoutes. + The default value is \c true. + + \note Whether this property has any effect is plugin-dependent. + Also, whether or not it has an effect while the navigator is active is plugin-dependent. +*/ + +/*! + \qmlproperty bool Qt.labs.location::Navigator::isOnRoute + + While the Navigator is in active tracking mode, this property tells + whether the position from \l positionSource is on the route or not. +*/ + +/*! + \qmlmethod void Qt.labs.location::Navigator::recalculateRoutes() + + Calling this method forces the backend to trigger a routes recalculation. + + \sa automaticReroutingEnabled +*/ + /*! \qmlproperty enumeration Qt.labs.location::Navigator::error \readonly diff --git a/src/positioningquick/qdeclarativepositionsource_p.h b/src/positioningquick/qdeclarativepositionsource_p.h index da6f8305..0c1d8944 100644 --- a/src/positioningquick/qdeclarativepositionsource_p.h +++ b/src/positioningquick/qdeclarativepositionsource_p.h @@ -131,8 +131,8 @@ public: void classBegin() { } void componentComplete(); - Q_INVOKABLE bool setBackendProperty(const QString &name, const QVariant &value); - Q_INVOKABLE QVariant backendProperty(const QString &name) const; + Q_REVISION(14) Q_INVOKABLE bool setBackendProperty(const QString &name, const QVariant &value); + Q_REVISION(14) Q_INVOKABLE QVariant backendProperty(const QString &name) const; public Q_SLOTS: void update(); // TODO Qt 6 change to void update(int) -- cgit v1.2.1