summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2019-03-06 14:37:19 +0100
committerPaolo Angelelli <paolo.angelelli@qt.io>2019-03-07 10:38:54 +0000
commitb1f6028c2aba51b898ce380f7b584ae603a06382 (patch)
treefc278ccb965b6b9721e9c47c74b2625901b6143e
parent6ab05afcfca6df2c96ef2d69149332f24eebb9e6 (diff)
downloadqtlocation-b1f6028c2aba51b898ce380f7b584ae603a06382.tar.gz
Fix 5.13 API Review Issues for Location
Revision invokable fitViewportToGeoShape method. Q_REVISION was missing in the change that introduced this invokable method. Fix revision of Route.extendedAttribute. The revision for this property must be 13 as it has been introduced in 5.13. Register QDeclarativeGeoLocation with revision 13. So that the newly added extendedAttributes property, in 5.13, works. Fixes: QTBUG-74247 Change-Id: Idcddef92966308af118e96a3549ce9e2cf972d72 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
-rw-r--r--src/imports/positioning/positioning.cpp3
-rw-r--r--src/location/declarativemaps/qdeclarativegeomap_p.h2
-rw-r--r--src/location/declarativemaps/qdeclarativegeoroute_p.h2
3 files changed, 5 insertions, 2 deletions
diff --git a/src/imports/positioning/positioning.cpp b/src/imports/positioning/positioning.cpp
index 5057e5a1..4349f63b 100644
--- a/src/imports/positioning/positioning.cpp
+++ b/src/imports/positioning/positioning.cpp
@@ -613,6 +613,9 @@ public:
minor = 4;
qmlRegisterType<QDeclarativePosition, 2>(uri, major, minor, "Position");
+ minor = 13;
+ qmlRegisterType<QDeclarativeGeoLocation, 13>(uri, major, minor, "Location");
+
// Register the latest Qt version as QML type version
qmlRegisterModule(uri, QT_VERSION_MAJOR, QT_VERSION_MINOR);
} else {
diff --git a/src/location/declarativemaps/qdeclarativegeomap_p.h b/src/location/declarativemaps/qdeclarativegeomap_p.h
index 3cbefe79..55751365 100644
--- a/src/location/declarativemaps/qdeclarativegeomap_p.h
+++ b/src/location/declarativemaps/qdeclarativegeomap_p.h
@@ -198,7 +198,7 @@ public:
Q_INVOKABLE void pan(int dx, int dy);
Q_INVOKABLE void prefetchData(); // optional hint for prefetch
Q_INVOKABLE void clearData();
- Q_INVOKABLE void fitViewportToGeoShape(const QGeoShape &shape, QVariant margins);
+ Q_REVISION(13) Q_INVOKABLE void fitViewportToGeoShape(const QGeoShape &shape, QVariant margins);
void fitViewportToGeoShape(const QGeoShape &shape, const QMargins &borders = QMargins(10, 10, 10, 10));
QString errorString() const;
diff --git a/src/location/declarativemaps/qdeclarativegeoroute_p.h b/src/location/declarativemaps/qdeclarativegeoroute_p.h
index 767e21ea..f455d027 100644
--- a/src/location/declarativemaps/qdeclarativegeoroute_p.h
+++ b/src/location/declarativemaps/qdeclarativegeoroute_p.h
@@ -69,7 +69,7 @@ class Q_LOCATION_PRIVATE_EXPORT QDeclarativeGeoRoute : public QObject
Q_PROPERTY(QQmlListProperty<QDeclarativeGeoRouteSegment> segments READ segments CONSTANT)
Q_PROPERTY(QDeclarativeGeoRouteQuery *routeQuery READ routeQuery REVISION 11)
Q_PROPERTY(QList<QObject *> legs READ legs CONSTANT REVISION 12)
- Q_PROPERTY(QObject *extendedAttributes READ extendedAttributes CONSTANT REVISION 12)
+ Q_PROPERTY(QObject *extendedAttributes READ extendedAttributes CONSTANT REVISION 13)
public:
explicit QDeclarativeGeoRoute(QObject *parent = 0);