summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/nokia
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@jollamobile.com>2014-01-06 13:44:16 +1000
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-07 09:24:21 +0100
commit5e8e9451d1f6c94d0242f60a48e4f154403f6ac1 (patch)
tree73dc6006e921246d214f4f52efa83b31efdfd695 /src/plugins/geoservices/nokia
parent28e6a10ca23df2f4dd5aee73c902e0bfbec2f6d6 (diff)
downloadqtlocation-5e8e9451d1f6c94d0242f60a48e4f154403f6ac1.tar.gz
Enhance measurement system support in routing manager.
It is useful to be able to set the measurement system independently of the locale used by the routing manager. Add accessor functions for the measurement system to the routing manager classes. Locale and measurement system properties are also added to the RouteModel QML type. Change-Id: I8ee9fbdb5ab94615fef7019914b0f104aebfa9c8 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/plugins/geoservices/nokia')
-rw-r--r--src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp b/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp
index 9bd60155..53bdc3cd 100644
--- a/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp
+++ b/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp
@@ -442,14 +442,14 @@ QString QGeoRoutingManagerEngineNokia::routeRequestString(const QGeoRouteRequest
requestString += "&instructionformat=text";
- const QLocale loc(locale());
-
requestString += "&metricSystem=";
- if (QLocale::MetricSystem == loc.measurementSystem())
+ if (QLocale::MetricSystem == measurementSystem())
requestString += "metric";
else
requestString += "imperial";
+ const QLocale loc(locale());
+
if (QLocale::C != loc.language() && QLocale::AnyLanguage != loc.language()) {
requestString += "&language=";
requestString += loc.name();