summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2018-06-28 11:30:24 +0200
committerPaolo Angelelli <paolo.angelelli@qt.io>2018-06-28 11:30:33 +0200
commitf90a79bce76d536e5eaa62892c892d85e6823d40 (patch)
tree94a86e50ecd1f017b2a7971eb8c4bc3600be6c3c
parentfafa19f90f3622878519fa9bd331d634a92f1bd9 (diff)
parent178d6a3295336a43c33b8d39cfd36de638e9d4f4 (diff)
downloadqtlocation-f90a79bce76d536e5eaa62892c892d85e6823d40.tar.gz
Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I2a881d8b9d29539735071a2d76d774e629a5c8c0
-rw-r--r--src/location/doc/src/plugins/osm.qdoc8
-rw-r--r--src/location/labs/qdeclarativenavigator.cpp28
-rw-r--r--src/location/labs/qdeclarativenavigator_p.h5
-rw-r--r--src/location/labs/qdeclarativenavigator_p_p.h1
-rw-r--r--src/location/location.pro2
5 files changed, 41 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/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
@@ -126,6 +126,19 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \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
This read-only property holds the current route the navigator following.
@@ -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
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 \