summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron McCarthy <mccarthy.aaron@gmail.com>2015-11-18 11:06:59 +1000
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-11-18 12:12:31 +0000
commit689e755efcb72bdc4b8891af1d9a5fc227e22f8f (patch)
treeea4a33084524b29a8be5139cef6f1f6de7885e8e
parent76481db8fd0c5ee88c3c7941fb0af6e0464508dc (diff)
downloadqtlocation-689e755efcb72bdc4b8891af1d9a5fc227e22f8f.tar.gz
Fix route requests with excluded areas
Due to a typo in the loop condition excluded areas were excluded from the generated request string. [ChangeLog][QtLocation][Here plugin] Fix route requests with excluded areas. Change-Id: I3f5d5bb7b4b9ab660dc0288f0ed54d02a1e7068b Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
-rw-r--r--src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp b/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp
index af6cbcf0..a33d1ba8 100644
--- a/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp
+++ b/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp
@@ -376,18 +376,15 @@ QString QGeoRoutingManagerEngineNokia::routeRequestString(const QGeoRouteRequest
{
QString requestString;
- const QList<QGeoRectangle> excludeAreas = request.excludeAreas();
- QList<QGeoRectangle>::const_iterator beg = excludeAreas.begin();
- QList<QGeoRectangle>::const_iterator end = excludeAreas.begin();
- for (QList<QGeoRectangle>::const_iterator it = beg; it != end; ++it) {
+ foreach (const QGeoRectangle &area, request.excludeAreas()) {
requestString += QLatin1String("&avoidareas=");
- requestString += trimDouble(it->topLeft().latitude());
+ requestString += trimDouble(area.topLeft().latitude());
requestString += QLatin1String(",");
- requestString += trimDouble(it->topLeft().longitude());
+ requestString += trimDouble(area.topLeft().longitude());
requestString += QLatin1String(";");
- requestString += trimDouble(it->bottomRight().latitude());
+ requestString += trimDouble(area.bottomRight().latitude());
requestString += QLatin1String(",");
- requestString += trimDouble(it->bottomRight().longitude());
+ requestString += trimDouble(area.bottomRight().longitude());
}
// TODO: work out what was going on here