summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2017-12-15 13:53:51 (GMT)
committerPaolo Angelelli <paolo.angelelli@qt.io>2017-12-15 13:53:51 (GMT)
commit337aea7bc386d5e97825d27335d860fc88b2bee3 (patch)
tree76d316a935755a922e6b7b998867c7cba90f0a94
parent57f42a11363cb61892937caa904c3f5c660cabeb (diff)
parent730b2bd96e88fe63364c9f81e299555f0b1f0daa (diff)
downloadqtlocation-337aea7bc386d5e97825d27335d860fc88b2bee3.tar.gz
Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts: .qmake.conf Change-Id: I8300f5fcbbe3064049e11d2b04c10e35c9945c8d
-rw-r--r--examples/location/mapviewer/mapviewer.pro5
m---------src/3rdparty/mapbox-gl-native0
-rw-r--r--src/location/maps/qgeomapparameter_p.h4
-rw-r--r--src/plugins/geoservices/mapbox/qgeoroutereplymapbox.cpp2
-rw-r--r--src/plugins/geoservices/mapboxgl/qgeoserviceproviderpluginmapboxgl.cpp9
-rw-r--r--src/plugins/geoservices/osm/qgeoroutereplyosm.cpp2
6 files changed, 9 insertions, 13 deletions
diff --git a/examples/location/mapviewer/mapviewer.pro b/examples/location/mapviewer/mapviewer.pro
index 90d85e6..d49258a 100644
--- a/examples/location/mapviewer/mapviewer.pro
+++ b/examples/location/mapviewer/mapviewer.pro
@@ -5,6 +5,11 @@ QT += qml network quick positioning location
CONFIG += qtquickcompiler
SOURCES += main.cpp
+# Workaround for QTBUG-38735
+QT_FOR_CONFIG += location-private
+qtConfig(geoservices_mapboxgl): QT += sql opengl
+qtConfig(geoservices_osm): QT += concurrent
+
RESOURCES += \
mapviewer.qrc
diff --git a/src/3rdparty/mapbox-gl-native b/src/3rdparty/mapbox-gl-native
-Subproject 572822c8ca15be190b43afbf7f91d132e988bf2
+Subproject 8c1be4ec01ef46bf453856531ebf53b48ce3dbe
diff --git a/src/location/maps/qgeomapparameter_p.h b/src/location/maps/qgeomapparameter_p.h
index bc39c14..7f27e8b 100644
--- a/src/location/maps/qgeomapparameter_p.h
+++ b/src/location/maps/qgeomapparameter_p.h
@@ -64,8 +64,8 @@ public:
explicit QGeoMapParameter(QObject *parent = 0);
virtual ~QGeoMapParameter();
- QString type() const;
- void setType(const QString &type);
+ virtual QString type() const;
+ virtual void setType(const QString &type);
void updateProperty(const char *propertyName, QVariant value);
diff --git a/src/plugins/geoservices/mapbox/qgeoroutereplymapbox.cpp b/src/plugins/geoservices/mapbox/qgeoroutereplymapbox.cpp
index 8fc3386..3099657 100644
--- a/src/plugins/geoservices/mapbox/qgeoroutereplymapbox.cpp
+++ b/src/plugins/geoservices/mapbox/qgeoroutereplymapbox.cpp
@@ -188,7 +188,7 @@ void QGeoRouteReplyMapbox::networkReplyFinished()
QList<QGeoRoute> list;
QJsonArray routes = object.value(QStringLiteral("routes")).toArray();
- for (int i = 0; i < routes.count(); i++) {
+ for (int i = 0; i < qMin(routes.count(), request().numberAlternativeRoutes() + 1); i++) {
QGeoRoute route = constructRoute(routes.at(i).toObject());
list.append(route);
}
diff --git a/src/plugins/geoservices/mapboxgl/qgeoserviceproviderpluginmapboxgl.cpp b/src/plugins/geoservices/mapboxgl/qgeoserviceproviderpluginmapboxgl.cpp
index c7d5d3e..dd25c99 100644
--- a/src/plugins/geoservices/mapboxgl/qgeoserviceproviderpluginmapboxgl.cpp
+++ b/src/plugins/geoservices/mapboxgl/qgeoserviceproviderpluginmapboxgl.cpp
@@ -65,15 +65,6 @@ QGeoCodingManagerEngine *QGeoServiceProviderFactoryMapboxGL::createGeocodingMana
QGeoMappingManagerEngine *QGeoServiceProviderFactoryMapboxGL::createMappingManagerEngine(
const QVariantMap &parameters, QGeoServiceProvider::Error *error, QString *errorString) const
{
-#ifdef Q_OS_WIN
- if (QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGLES) {
- qWarning("The Mapbox GL plugin only supports OpenGL ES on Windows. \
- Try setting the environment variable QT_OPENGL to 'angle'.");
-
- return 0;
- }
-#endif
-
return new QGeoMappingManagerEngineMapboxGL(parameters, error, errorString);
}
diff --git a/src/plugins/geoservices/osm/qgeoroutereplyosm.cpp b/src/plugins/geoservices/osm/qgeoroutereplyosm.cpp
index 6924fda..732e8d7 100644
--- a/src/plugins/geoservices/osm/qgeoroutereplyosm.cpp
+++ b/src/plugins/geoservices/osm/qgeoroutereplyosm.cpp
@@ -77,7 +77,7 @@ void QGeoRouteReplyOsm::networkReplyFinished()
QGeoRouteReply::Error error = parser->parseReply(routes, errorString, reply->readAll());
if (error == QGeoRouteReply::NoError) {
- setRoutes(routes.mid(0,1)); // TODO QTBUG-56426
+ setRoutes(routes.mid(0, request().numberAlternativeRoutes() + 1));
// setError(QGeoRouteReply::NoError, status); // can't do this, or NoError is emitted and does damages
setFinished(true);
} else {