summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/geoservices/nokia/qgeocodereply_nokia.cpp4
-rw-r--r--src/plugins/geoservices/nokia/qgeoerror_messages.cpp1
-rw-r--r--src/plugins/geoservices/nokia/qgeoerror_messages.h1
-rw-r--r--src/plugins/geoservices/nokia/qgeoroutereply_nokia.cpp5
4 files changed, 9 insertions, 2 deletions
diff --git a/src/plugins/geoservices/nokia/qgeocodereply_nokia.cpp b/src/plugins/geoservices/nokia/qgeocodereply_nokia.cpp
index 8690eb65..f1d0f4d4 100644
--- a/src/plugins/geoservices/nokia/qgeocodereply_nokia.cpp
+++ b/src/plugins/geoservices/nokia/qgeocodereply_nokia.cpp
@@ -48,8 +48,10 @@
#include "qgeocodereply_nokia.h"
#include "qgeocodexmlparser.h"
+#include "qgeoerror_messages.h"
#include <QtPositioning/QGeoShape>
+#include <QtCore/QCoreApplication>
Q_DECLARE_METATYPE(QList<QGeoLocation>)
@@ -136,7 +138,7 @@ void QGeoCodeReplyNokia::parseError(const QString &errorString)
Q_UNUSED(errorString)
setError(QGeoCodeReply::ParseError,
- tr("The response from the service was not in a recognisable format."));
+ QCoreApplication::translate(NOKIA_PLUGIN_CONTEXT_NAME, RESPONSE_NOT_RECOGNIZABLE));
abort();
}
diff --git a/src/plugins/geoservices/nokia/qgeoerror_messages.cpp b/src/plugins/geoservices/nokia/qgeoerror_messages.cpp
index 05cb93fa..5995876b 100644
--- a/src/plugins/geoservices/nokia/qgeoerror_messages.cpp
+++ b/src/plugins/geoservices/nokia/qgeoerror_messages.cpp
@@ -59,5 +59,6 @@ const char REMOVING_CATEGORY_NOT_SUPPORTED[] = QT_TRANSLATE_NOOP("QtLocationQML"
const char PARSE_ERROR[] = QT_TRANSLATE_NOOP("QtLocationQML", "Error parsing response.");
const char NETWORK_ERROR[] = QT_TRANSLATE_NOOP("QtLocationQML", "Network error.");
const char CANCEL_ERROR[] = QT_TRANSLATE_NOOP("QtLocationQML", "Request was canceled.");
+const char RESPONSE_NOT_RECOGNIZABLE[] = QT_TRANSLATE_NOOP("QtLocationQML", "The response from the service was not in a recognizable format.");
QT_END_NAMESPACE
diff --git a/src/plugins/geoservices/nokia/qgeoerror_messages.h b/src/plugins/geoservices/nokia/qgeoerror_messages.h
index 03a85dc0..b1227629 100644
--- a/src/plugins/geoservices/nokia/qgeoerror_messages.h
+++ b/src/plugins/geoservices/nokia/qgeoerror_messages.h
@@ -63,6 +63,7 @@ extern const char REMOVING_CATEGORY_NOT_SUPPORTED[];
extern const char PARSE_ERROR[];
extern const char NETWORK_ERROR[];
extern const char CANCEL_ERROR[];
+extern const char RESPONSE_NOT_RECOGNIZABLE[];
QT_END_NAMESPACE
diff --git a/src/plugins/geoservices/nokia/qgeoroutereply_nokia.cpp b/src/plugins/geoservices/nokia/qgeoroutereply_nokia.cpp
index 72f2c60d..861436c5 100644
--- a/src/plugins/geoservices/nokia/qgeoroutereply_nokia.cpp
+++ b/src/plugins/geoservices/nokia/qgeoroutereply_nokia.cpp
@@ -48,9 +48,12 @@
#include "qgeoroutereply_nokia.h"
#include "qgeoroutexmlparser.h"
+#include "qgeoerror_messages.h"
#include <qgeorouterequest.h>
+#include <QtCore/QCoreApplication>
+
Q_DECLARE_METATYPE(QList<QGeoRoute>)
QT_BEGIN_NAMESPACE
@@ -150,7 +153,7 @@ void QGeoRouteReplyNokia::parserError(const QString &errorString)
--m_parsers;
setError(QGeoRouteReply::ParseError,
- tr("The response from the service was not in a recognisable format."));
+ QCoreApplication::translate(NOKIA_PLUGIN_CONTEXT_NAME, RESPONSE_NOT_RECOGNIZABLE));
abort();
}