From 350708b2027b433b02a6ec608020e33a34630750 Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Fri, 4 May 2018 14:16:10 +0200 Subject: Document potential ssl dependency in OSM provider Task-number: QTBUG-68086 Change-Id: Idce724314777f0edc0ffefcea6cc838757800067 Reviewed-by: Denis Shienkov Reviewed-by: Alex Blasche --- src/location/doc/src/plugins/osm.qdoc | 8 ++++++-- src/location/location.pro | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/location/doc/src/plugins/osm.qdoc b/src/location/doc/src/plugins/osm.qdoc index 9374f207..649d3bed 100644 --- a/src/location/doc/src/plugins/osm.qdoc +++ b/src/location/doc/src/plugins/osm.qdoc @@ -43,10 +43,14 @@ available under the \l {http://www.opendatacommons.org/licenses/odbl}{Open Datab The Open Street Map geo services plugin can be loaded by using the plugin key "osm". -\note Since Qt 5.6.2, the available map types offered by this plugin may change without notice depending on the -actual availability of each provider. To prevent these changes, either a different geo service plugin should be used, or the plugin +\note Since Qt 5.6.2, the available map types offered by this plugin may change (or be removed) +without notice depending on the actual availability of a viable openly accessible provider for each type. +This also implies that providers serving tiles over HTTPS may be used. +This becomes relevant when using the OSM plugin on platforms, such as Android, for which SSL support is not built into Qt by default. +To prevent these changes, either a different geo service plugin should be used, or the plugin parameter \e osm.mapping.providersrepository.address should be set to a user-specified repository, in order to take full control over (and accept \b responsibility for) selecting the provider that is used for each map type. +Since Qt 5.9.6 the default nominatim endpoint, used for geocoding and places, has also changed to HTTPS-only. \section1 Parameters diff --git a/src/location/location.pro b/src/location/location.pro index 89c1fdd5..1535a85e 100644 --- a/src/location/location.pro +++ b/src/location/location.pro @@ -23,7 +23,7 @@ MODULE_PLUGIN_TYPES = \ geoservices QMAKE_DOCS = $$PWD/doc/qtlocation.qdocconf -OTHER_FILES += configure.json doc/src/*.qdoc # show .qdoc files in Qt Creator +OTHER_FILES += configure.json doc/src/*.qdoc doc/src/plugins/*.qdoc # show .qdoc files in Qt Creator PUBLIC_HEADERS += \ qlocation.h \ -- cgit v1.2.1 From 178d6a3295336a43c33b8d39cfd36de638e9d4f4 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Wed, 20 Jun 2018 14:10:36 +0300 Subject: Add Qt.labs.location::Navigator::trackPositionSource property This property tells whether the Navigator should control the Map camera to keep track of position source updates. This property is enabled by default, and setting it to false is useful in cases where e.g. the user starts gesturing over the map area. Task-number: QTBUG-69031 Change-Id: I86157f69890f8cf0eb60d457d0f9c4134e2befb0 Reviewed-by: BogDan Vatra Reviewed-by: Paolo Angelelli --- src/location/labs/qdeclarativenavigator.cpp | 28 +++++++++++++++++++++++++++ src/location/labs/qdeclarativenavigator_p.h | 5 +++++ src/location/labs/qdeclarativenavigator_p_p.h | 1 + 3 files changed, 34 insertions(+) diff --git a/src/location/labs/qdeclarativenavigator.cpp b/src/location/labs/qdeclarativenavigator.cpp index 5fe36bb8..7dba341e 100644 --- a/src/location/labs/qdeclarativenavigator.cpp +++ b/src/location/labs/qdeclarativenavigator.cpp @@ -125,6 +125,19 @@ QT_BEGIN_NAMESPACE instantiated, and the other required properties are set to valid values. */ +/*! + \qmlproperty bool Qt.labs.location::Navigator::trackPositionSource + + This property tells whether the Navigator should control the Map camera to + keep track of position source updates. This property is enabled (\c true) by + default, and setting it to \c false is useful in cases where e.g. the user + starts gesturing over the map area. + + Navigator plugins can also control this property directly e.g. user map + interaction could trigger the property change. Honoring the user-specified + value of this property is plugin dependent. +*/ + /*! \qmlproperty Route Qt.labs.location::Navigator::currentRoute @@ -284,6 +297,21 @@ bool QDeclarativeNavigator::navigatorReady() const return d_ptr->m_ready; } +bool QDeclarativeNavigator::trackPositionSource() const +{ + return d_ptr->m_trackPositionSource; +} + +void QDeclarativeNavigator::setTrackPositionSource(bool trackPositionSource) +{ + if (trackPositionSource == d_ptr->m_trackPositionSource) + return; + + d_ptr->m_trackPositionSource = trackPositionSource; + + emit trackPositionSourceChanged(trackPositionSource); +} + QDeclarativeGeoRoute *QDeclarativeNavigator::currentRoute() const { if (!d_ptr->m_ready || !d_ptr->m_navigationManager->active()) diff --git a/src/location/labs/qdeclarativenavigator_p.h b/src/location/labs/qdeclarativenavigator_p.h index 0373bf57..3c83ec94 100644 --- a/src/location/labs/qdeclarativenavigator_p.h +++ b/src/location/labs/qdeclarativenavigator_p.h @@ -75,6 +75,7 @@ class Q_LOCATION_PRIVATE_EXPORT QDeclarativeNavigator : public QParameterizableO Q_PROPERTY(QDeclarativePositionSource *positionSource READ positionSource WRITE setPositionSource NOTIFY positionSourceChanged) Q_PROPERTY(bool active READ active WRITE setActive NOTIFY activeChanged) Q_PROPERTY(bool navigatorReady READ navigatorReady NOTIFY navigatorReadyChanged) + Q_PROPERTY(bool trackPositionSource READ trackPositionSource WRITE setTrackPositionSource NOTIFY trackPositionSourceChanged) Q_PROPERTY(QDeclarativeGeoRoute *currentRoute READ currentRoute NOTIFY currentRouteChanged) Q_PROPERTY(int currentSegment READ currentSegment NOTIFY currentSegmentChanged) Q_INTERFACES(QQmlParserStatus) @@ -109,11 +110,15 @@ public: QNavigationManager *navigationManager() const; bool navigatorReady() const; + void setTrackPositionSource(bool trackPositionSource); + bool trackPositionSource() const; + QDeclarativeGeoRoute *currentRoute() const; int currentSegment() const; signals: void navigatorReadyChanged(bool ready); + void trackPositionSourceChanged(bool trackPositionSource); void activeChanged(bool active); void waypointReached(const QDeclarativeGeoWaypoint *pos); void destinationReached(); diff --git a/src/location/labs/qdeclarativenavigator_p_p.h b/src/location/labs/qdeclarativenavigator_p_p.h index c4198714..3710054e 100644 --- a/src/location/labs/qdeclarativenavigator_p_p.h +++ b/src/location/labs/qdeclarativenavigator_p_p.h @@ -84,6 +84,7 @@ public: bool m_active = false; bool m_completed = false; bool m_ready = false; + bool m_trackPositionSource = true; }; QT_END_NAMESPACE -- cgit v1.2.1