From 1c356029e308283c4c305dda855a094cf16e19ef Mon Sep 17 00:00:00 2001 From: Vladimir Bezkorovainyi Date: Wed, 30 May 2012 18:13:28 +0200 Subject: Move hard-codded messages into separate file and declare constants for them. Change-Id: I35a2a5ca9d4c4dc20e291051666bb88f4264ab33 Reviewed-by: Jean Gressmann --- src/plugins/geoservices/nokia/placesv2/qplacecontentreplyimpl.cpp | 4 +++- src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp | 4 +++- .../geoservices/nokia/placesv2/qplacerecommendationreplyimpl.cpp | 4 +++- src/plugins/geoservices/nokia/placesv2/qplacesearchreplyimpl.cpp | 4 +++- .../geoservices/nokia/placesv2/qplacesearchsuggestionreplyimpl.cpp | 4 +++- 5 files changed, 15 insertions(+), 5 deletions(-) (limited to 'src/plugins/geoservices/nokia/placesv2') diff --git a/src/plugins/geoservices/nokia/placesv2/qplacecontentreplyimpl.cpp b/src/plugins/geoservices/nokia/placesv2/qplacecontentreplyimpl.cpp index 2266ae56..1617d438 100644 --- a/src/plugins/geoservices/nokia/placesv2/qplacecontentreplyimpl.cpp +++ b/src/plugins/geoservices/nokia/placesv2/qplacecontentreplyimpl.cpp @@ -49,7 +49,9 @@ #include "jsonparserhelpers.h" #include "qplacecontentreplyimpl.h" #include "../qplacemanagerengine_nokiav2.h" +#include "../qgeoerror_messages.h" +#include #include #include @@ -94,7 +96,7 @@ void QPlaceContentReplyImpl::replyFinished() { QJsonDocument document = QJsonDocument::fromJson(m_reply->readAll()); if (!document.isObject()) { - setError(ParseError, tr("Error parsing response.")); + setError(ParseError, QCoreApplication::translate(NOKIA_PLUGIN_CONTEXT_NAME, PARSE_ERROR)); return; } diff --git a/src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp b/src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp index 0f76b891..3fe94aee 100644 --- a/src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp +++ b/src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp @@ -49,7 +49,9 @@ #include "qplacedetailsreplyimpl.h" #include "jsonparserhelpers.h" #include "../qplacemanagerengine_nokiav2.h" +#include "../qgeoerror_messages.h" +#include #include #include #include @@ -133,7 +135,7 @@ void QPlaceDetailsReplyImpl::replyFinished() { QJsonDocument document = QJsonDocument::fromJson(m_reply->readAll()); if (!document.isObject()) { - setError(ParseError, tr("Error parsing response.")); + setError(ParseError, QCoreApplication::translate(NOKIA_PLUGIN_CONTEXT_NAME, PARSE_ERROR)); return; } diff --git a/src/plugins/geoservices/nokia/placesv2/qplacerecommendationreplyimpl.cpp b/src/plugins/geoservices/nokia/placesv2/qplacerecommendationreplyimpl.cpp index 3f24f937..cfbb6da9 100644 --- a/src/plugins/geoservices/nokia/placesv2/qplacerecommendationreplyimpl.cpp +++ b/src/plugins/geoservices/nokia/placesv2/qplacerecommendationreplyimpl.cpp @@ -49,7 +49,9 @@ #include "qplacerecommendationreplyimpl.h" #include "jsonparserhelpers.h" #include "../qplacemanagerengine_nokiav2.h" +#include "../qgeoerror_messages.h" +#include #include #include #include @@ -94,7 +96,7 @@ void QPlaceRecommendationReplyImpl::replyFinished() { QJsonDocument document = QJsonDocument::fromJson(m_reply->readAll()); if (!document.isObject()) { - setError(ParseError, tr("Error parsing response.")); + setError(ParseError, QCoreApplication::translate(NOKIA_PLUGIN_CONTEXT_NAME, PARSE_ERROR)); emit error(error(), errorString()); return; } diff --git a/src/plugins/geoservices/nokia/placesv2/qplacesearchreplyimpl.cpp b/src/plugins/geoservices/nokia/placesv2/qplacesearchreplyimpl.cpp index 3c29cdc1..b4d6c2e5 100644 --- a/src/plugins/geoservices/nokia/placesv2/qplacesearchreplyimpl.cpp +++ b/src/plugins/geoservices/nokia/placesv2/qplacesearchreplyimpl.cpp @@ -49,7 +49,9 @@ #include "qplacesearchreplyimpl.h" #include "jsonparserhelpers.h" #include "../qplacemanagerengine_nokiav2.h" +#include "../qgeoerror_messages.h" +#include #include #include #include @@ -95,7 +97,7 @@ void QPlaceSearchReplyImpl::replyFinished() { QJsonDocument document = QJsonDocument::fromJson(m_reply->readAll()); if (!document.isObject()) { - setError(ParseError, tr("Error parsing response.")); + setError(ParseError, QCoreApplication::translate(NOKIA_PLUGIN_CONTEXT_NAME, PARSE_ERROR)); emit error(error(), errorString()); return; } diff --git a/src/plugins/geoservices/nokia/placesv2/qplacesearchsuggestionreplyimpl.cpp b/src/plugins/geoservices/nokia/placesv2/qplacesearchsuggestionreplyimpl.cpp index ce4cd3b2..37820e3a 100644 --- a/src/plugins/geoservices/nokia/placesv2/qplacesearchsuggestionreplyimpl.cpp +++ b/src/plugins/geoservices/nokia/placesv2/qplacesearchsuggestionreplyimpl.cpp @@ -47,7 +47,9 @@ ****************************************************************************/ #include "qplacesearchsuggestionreplyimpl.h" +#include "../qgeoerror_messages.h" +#include #include #include #include @@ -90,7 +92,7 @@ void QPlaceSearchSuggestionReplyImpl::replyFinished() { QJsonDocument document = QJsonDocument::fromJson(m_reply->readAll()); if (!document.isObject()) { - setError(ParseError, tr("Error parsing response.")); + setError(ParseError, QCoreApplication::translate(NOKIA_PLUGIN_CONTEXT_NAME, PARSE_ERROR)); emit error(error(), errorString()); return; } -- cgit v1.2.1