summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/geoservices')
-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
3 files changed, 2 insertions, 11 deletions
diff --git a/src/plugins/geoservices/mapbox/qgeoroutereplymapbox.cpp b/src/plugins/geoservices/mapbox/qgeoroutereplymapbox.cpp
index 8fc3386a..3099657b 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 c7d5d3ee..dd25c99e 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 6924fda7..732e8d72 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 {