summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-05-26 03:00:44 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-05-26 03:00:44 +0200
commit1ab2112cfc68dbb3d54bebc83ffaece8a6d8e1c5 (patch)
treee065254d1814fce0eaaac43bc132c19571c3eadc
parentde884ff5669fb9a6c0f50e69d6eb2557ca9dea94 (diff)
parent8a7c9fa1a705f7a2fb3f066b755faaa2f4064ceb (diff)
downloadqtlocation-1ab2112cfc68dbb3d54bebc83ffaece8a6d8e1c5.tar.gz
Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I62794d052a60f4078d3c6aa3912df5893f7a8585
-rw-r--r--.gitmodules2
m---------src/3rdparty/mapbox-gl-native0
-rw-r--r--src/location/declarativemaps/qdeclarativegeoroute_p.h2
-rw-r--r--src/location/doc/src/plugins/esri.qdoc30
-rw-r--r--src/location/doc/src/plugins/mapboxgl.qdoc2
-rw-r--r--src/location/labs/qmapobjectview.cpp4
-rw-r--r--src/plugins/geoservices/mapbox/qgeoroutingmanagerenginemapbox.cpp6
-rw-r--r--src/plugins/geoservices/mapboxgl/mapboxgl.pro5
-rw-r--r--src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp2
-rw-r--r--src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp5
-rw-r--r--src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp4
-rw-r--r--src/positioning/qnmeapositioninfosource.cpp13
12 files changed, 42 insertions, 33 deletions
diff --git a/.gitmodules b/.gitmodules
index 22c3849d..a5343bfd 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,4 +1,4 @@
[submodule "src/3rdparty/mapbox-gl-native"]
path = src/3rdparty/mapbox-gl-native
url = ../qtlocation-mapboxgl.git
- branch = upstream/qt-staging-5.11.0
+ branch = upstream/qt-staging
diff --git a/src/3rdparty/mapbox-gl-native b/src/3rdparty/mapbox-gl-native
-Subproject 74df5203628b47931b4edcb5e8fe352f40fe7df
+Subproject b59b0450c60b3df9e0852f62f6c8a6024889cd9
diff --git a/src/location/declarativemaps/qdeclarativegeoroute_p.h b/src/location/declarativemaps/qdeclarativegeoroute_p.h
index 7e7ae368..c19c2674 100644
--- a/src/location/declarativemaps/qdeclarativegeoroute_p.h
+++ b/src/location/declarativemaps/qdeclarativegeoroute_p.h
@@ -99,7 +99,7 @@ private:
static QDeclarativeGeoRouteSegment *segments_at(QQmlListProperty<QDeclarativeGeoRouteSegment> *prop, int index);
static void segments_clear(QQmlListProperty<QDeclarativeGeoRouteSegment> *prop);
- void initSegments(unsigned int lastIndex = -1);
+ void initSegments(unsigned int lastIndex = ~0U);
QList<QGeoCoordinate> routePath();
QGeoRoute route_;
diff --git a/src/location/doc/src/plugins/esri.qdoc b/src/location/doc/src/plugins/esri.qdoc
index 7a80d385..2707ca5d 100644
--- a/src/location/doc/src/plugins/esri.qdoc
+++ b/src/location/doc/src/plugins/esri.qdoc
@@ -3,9 +3,9 @@
** Copyright (C) 2013-2016 Esri <contracts@esri.com>
** Contact: https://www.qt.io/licensing/
**
-** This file is part of the QtLocation module of the Qt Toolkit.
+** This file is part of the documentation of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
@@ -14,25 +14,13 @@
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/location/doc/src/plugins/mapboxgl.qdoc b/src/location/doc/src/plugins/mapboxgl.qdoc
index 8ad6a9c2..51b49f93 100644
--- a/src/location/doc/src/plugins/mapboxgl.qdoc
+++ b/src/location/doc/src/plugins/mapboxgl.qdoc
@@ -176,6 +176,8 @@ replacing the dash with camel case for technical reasons (i.e. \b line-cap will
\li A style data \l {https://www.mapbox.com/mapbox-gl-js/style-spec/#sources}{source}. When using a source
of \b sourceType \l {https://www.mapbox.com/mapbox-gl-js/style-spec/#sources-geojson}{geojson}, the
\b data property can be both inlined or sourced from qrc.
+ \li Supported source types are: \b vector, \b raster, \b raster-dem and \b geojson.
+'geojson'.
\row
\li layer
\li Adds a new \l {https://www.mapbox.com/mapbox-gl-js/style-spec/#layers}{style layer} to the map. On a Mapbox GL map,
diff --git a/src/location/labs/qmapobjectview.cpp b/src/location/labs/qmapobjectview.cpp
index 175e7cc4..2ffc27bc 100644
--- a/src/location/labs/qmapobjectview.cpp
+++ b/src/location/labs/qmapobjectview.cpp
@@ -311,8 +311,10 @@ void QMapObjectView::removeMapObjectFromMap(int index)
{
if (index >= 0 && index < m_instantiatedMapObjects.size()) {
QGeoMapObject *mo = m_instantiatedMapObjects.takeAt(index);
- if (!mo)
+ if (!mo) {
+ m_delegateModel->cancel(index);
return;
+ }
mo->setMap(nullptr);
m_delegateModel->release(mo);
}
diff --git a/src/plugins/geoservices/mapbox/qgeoroutingmanagerenginemapbox.cpp b/src/plugins/geoservices/mapbox/qgeoroutingmanagerenginemapbox.cpp
index 73bca2f7..e8db635f 100644
--- a/src/plugins/geoservices/mapbox/qgeoroutingmanagerenginemapbox.cpp
+++ b/src/plugins/geoservices/mapbox/qgeoroutingmanagerenginemapbox.cpp
@@ -75,8 +75,14 @@ void QGeoRouteParserOsrmV5ExtensionMapbox::updateQuery(QUrlQuery &query) const
if (!m_accessToken.isEmpty())
query.addQueryItem(QLatin1String("access_token"), m_accessToken);
+ query.addQueryItem(QLatin1String("annotations"), QLatin1String("duration,distance,speed,congestion"));
+
query.addQueryItem(QLatin1String("voice_instructions"), QLatin1String("true"));
query.addQueryItem(QLatin1String("banner_instructions"), QLatin1String("true"));
+ query.addQueryItem(QLatin1String("roundabout_exits"), QLatin1String("true"));
+
+ QLocale::MeasurementSystem unit = QLocale::system().measurementSystem();
+ query.addQueryItem(QLatin1String("voice_units"), unit == QLocale::MetricSystem ? QLatin1String("metric") : QLatin1String("imperial"));
}
static QVariantMap parseMapboxVoiceInstruction(const QJsonObject &voiceInstruction)
diff --git a/src/plugins/geoservices/mapboxgl/mapboxgl.pro b/src/plugins/geoservices/mapboxgl/mapboxgl.pro
index 17b6f53a..9a586ff6 100644
--- a/src/plugins/geoservices/mapboxgl/mapboxgl.pro
+++ b/src/plugins/geoservices/mapboxgl/mapboxgl.pro
@@ -22,6 +22,11 @@ SOURCES += \
qmapboxglstylechange.cpp \
qsgmapboxglnode.cpp
+# Mapbox GL Native is always a static
+# library linked to this plugin
+QMAKE_CXXFLAGS += \
+ -DQT_MAPBOXGL_STATIC
+
RESOURCES += mapboxgl.qrc
OTHER_FILES += \
diff --git a/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp b/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp
index c04aa5e3..dfebc20d 100644
--- a/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp
+++ b/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp
@@ -138,7 +138,7 @@ QSGNode *QGeoMapMapboxGLPrivate::updateSceneGraph(QSGNode *node, QQuickWindow *w
if (m_useFBO) {
static_cast<QSGMapboxGLTextureNode *>(node)->resize(m_viewportSize, window->devicePixelRatio());
} else {
- map->resize(m_viewportSize, m_viewportSize * window->devicePixelRatio());
+ map->resize(m_viewportSize);
}
}
diff --git a/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp b/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
index f401707b..964f94f5 100644
--- a/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
+++ b/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
@@ -536,7 +536,7 @@ QSharedPointer<QMapboxGLStyleChange> QMapboxGLStyleAddSource::fromMapParameter(Q
Q_ASSERT(param->type() == "source");
static const QStringList acceptedSourceTypes = QStringList()
- << QStringLiteral("vector") << QStringLiteral("raster") << QStringLiteral("geojson");
+ << QStringLiteral("vector") << QStringLiteral("raster") << QStringLiteral("raster-dem") << QStringLiteral("geojson");
QString sourceType = param->property("sourceType").toString();
@@ -550,9 +550,10 @@ QSharedPointer<QMapboxGLStyleChange> QMapboxGLStyleAddSource::fromMapParameter(Q
break;
case 0: // vector
case 1: // raster
+ case 2: // raster-dem
source->m_params[QStringLiteral("url")] = param->property("url");
break;
- case 2: { // geojson
+ case 3: { // geojson
auto data = param->property("data").toString();
if (data.startsWith(':')) {
QFile geojson(data);
diff --git a/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp b/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp
index 7721fe61..ed594b56 100644
--- a/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp
+++ b/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp
@@ -62,10 +62,10 @@ void QSGMapboxGLTextureNode::resize(const QSize &size, qreal pixelRatio)
{
const QSize& minSize = size.expandedTo(minTextureSize);
const QSize fbSize = minSize * pixelRatio;
- m_map->resize(minSize, fbSize);
+ m_map->resize(minSize);
m_fbo.reset(new QOpenGLFramebufferObject(fbSize, QOpenGLFramebufferObject::CombinedDepthStencil));
- m_map->setFramebufferObject(m_fbo->handle());
+ m_map->setFramebufferObject(m_fbo->handle(), fbSize);
QSGPlainTexture *fboTexture = static_cast<QSGPlainTexture *>(texture());
if (!fboTexture) {
diff --git a/src/positioning/qnmeapositioninfosource.cpp b/src/positioning/qnmeapositioninfosource.cpp
index 282f30b4..63410022 100644
--- a/src/positioning/qnmeapositioninfosource.cpp
+++ b/src/positioning/qnmeapositioninfosource.cpp
@@ -243,13 +243,18 @@ static int processSentence(QGeoPositionInfo &info,
// the sentences containing the full timestamp (e.g., GPRMC) *first* !
if (infoTime.isValid()) {
if (pos.timestamp().time().isValid()) {
- if (infoTime != pos.timestamp().time() || infoDate != pos.timestamp().date()) {
- // Effectively read data for different update, so copy buf into m_nextLine
+ if (infoTime < pos.timestamp().time() ||
+ (infoDate.isValid() // if time is valid but one date or both are not,
+ && pos.timestamp().date().isValid()
+ && infoDate < pos.timestamp().date())) {
+ // Effectively read data for different update, that is also newer, so copy buf into m_nextLine
m_nextLine = QByteArray(buf, size);
break;
} else {
- // timestamps match -- merge into info
- mergePositions(info, pos, QByteArray(buf, size));
+ if (infoTime == pos.timestamp().time())
+ // timestamps match -- merge into info
+ mergePositions(info, pos, QByteArray(buf, size));
+ // else discard out of order outdated info.
}
} else {
// no timestamp available -- merge into info