From a011969f842d662b593e6b33c09dedd90c82de9c Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Sat, 18 Aug 2018 21:51:49 +0200 Subject: Set the request into QGeoRoute results in osm, mapbox plugins Change-Id: Iec8d1cb9ad369fe765e34bdcff2512e2726797ad Reviewed-by: Alex Blasche --- src/plugins/geoservices/mapbox/qgeoroutereplymapbox.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/plugins/geoservices/mapbox/qgeoroutereplymapbox.cpp') diff --git a/src/plugins/geoservices/mapbox/qgeoroutereplymapbox.cpp b/src/plugins/geoservices/mapbox/qgeoroutereplymapbox.cpp index c5f9d38c..8b0772ad 100644 --- a/src/plugins/geoservices/mapbox/qgeoroutereplymapbox.cpp +++ b/src/plugins/geoservices/mapbox/qgeoroutereplymapbox.cpp @@ -127,6 +127,13 @@ void QGeoRouteReplyMapbox::networkReplyFinished() QByteArray routeReply = reply->readAll(); QGeoRouteReply::Error error = parser->parseReply(routes, errorString, routeReply); + // Setting the request into the result + for (QGeoRoute &route : routes) { + route.setRequest(request()); + for (QGeoRoute &leg: route.routeLegs()) { + leg.setRequest(request()); + } + } QVariantMap metadata; metadata["osrm.reply-json"] = routeReply; -- cgit v1.2.1