diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-03-17 15:48:52 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-18 09:56:17 +0100 |
commit | 5619874cadc3c0f7524883d11da3ed0de17b28fb (patch) | |
tree | 36fe9817e967c26c270854b7f247f223180a0a33 /src/plugins | |
parent | c2a59fa4042cfcb39e3a124eee2a4bd77770fe84 (diff) | |
download | qtlocation-5619874cadc3c0f7524883d11da3ed0de17b28fb.tar.gz |
Nokia plugin: Move message about malformed reply to common messages.
Change-Id: Ic5611c5d8bc7ac697bed5ddb9294f6ed306ab2b7
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Diffstat (limited to 'src/plugins')
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(); } |