summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp
diff options
context:
space:
mode:
authorVladimir Bezkorovainyi <vladimir.bezkorovainyi@nokia.com>2012-05-30 18:13:28 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-31 17:57:34 +0200
commit1c356029e308283c4c305dda855a094cf16e19ef (patch)
tree028cc1e9aef5f0dcb0a2966b065b854428df44b1 /src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp
parentf72688998639d168444eec32f0b5ec04320369bb (diff)
downloadqtlocation-1c356029e308283c4c305dda855a094cf16e19ef.tar.gz
Move hard-codded messages into separate file and declare constants for them.
Change-Id: I35a2a5ca9d4c4dc20e291051666bb88f4264ab33 Reviewed-by: Jean Gressmann <jean.gressmann@nokia.com>
Diffstat (limited to 'src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp')
-rw-r--r--src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp b/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp
index c833df10..5cbc431a 100644
--- a/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp
+++ b/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp
@@ -58,7 +58,9 @@
#include "qgeonetworkaccessmanager.h"
#include "qgeouriprovider.h"
#include "uri_constants.h"
+#include "qgeoerror_messages.h"
+#include <QCoreApplication>
#include <QtCore/QFile>
#include <QtCore/QJsonArray>
#include <QtCore/QJsonDocument>
@@ -527,7 +529,7 @@ QPlaceIdReply *QPlaceManagerEngineNokiaV2::savePlace(const QPlace &place)
reply->setId(place.placeId());
QMetaObject::invokeMethod(reply, "setError", Qt::QueuedConnection,
Q_ARG(QPlaceReply::Error, QPlaceReply::UnsupportedError),
- Q_ARG(QString, tr("Saving places is not supported.")));
+ Q_ARG(QString, QCoreApplication::translate(NOKIA_PLUGIN_CONTEXT_NAME, SAVING_PLACE_NOT_SUPPORTED)));
connect(reply, SIGNAL(finished()), this, SLOT(replyFinished()));
connect(reply, SIGNAL(error(QPlaceReply::Error,QString)),
this, SLOT(replyError(QPlaceReply::Error,QString)));
@@ -540,7 +542,7 @@ QPlaceIdReply *QPlaceManagerEngineNokiaV2::removePlace(const QString &placeId)
reply->setId(placeId);
QMetaObject::invokeMethod(reply, "setError", Qt::QueuedConnection,
Q_ARG(QPlaceReply::Error, QPlaceReply::UnsupportedError),
- Q_ARG(QString, tr("Removing places is not supported.")));
+ Q_ARG(QString, QCoreApplication::translate(NOKIA_PLUGIN_CONTEXT_NAME, REMOVING_PLACE_NOT_SUPPORTED)));
connect(reply, SIGNAL(finished()), this, SLOT(replyFinished()));
connect(reply, SIGNAL(error(QPlaceReply::Error,QString)),
this, SLOT(replyError(QPlaceReply::Error,QString)));
@@ -555,7 +557,7 @@ QPlaceIdReply *QPlaceManagerEngineNokiaV2::saveCategory(const QPlaceCategory &ca
reply->setId(category.categoryId());
QMetaObject::invokeMethod(reply, "setError", Qt::QueuedConnection,
Q_ARG(QPlaceReply::Error, QPlaceReply::UnsupportedError),
- Q_ARG(QString, tr("Saving categories is not supported.")));
+ Q_ARG(QString, QCoreApplication::translate(NOKIA_PLUGIN_CONTEXT_NAME, SAVING_CATEGORY_NOT_SUPPORTED)));
connect(reply, SIGNAL(finished()), this, SLOT(replyFinished()));
connect(reply, SIGNAL(error(QPlaceReply::Error,QString)),
this, SLOT(replyError(QPlaceReply::Error,QString)));
@@ -568,7 +570,7 @@ QPlaceIdReply *QPlaceManagerEngineNokiaV2::removeCategory(const QString &categor
reply->setId(categoryId);
QMetaObject::invokeMethod(reply, "setError", Qt::QueuedConnection,
Q_ARG(QPlaceReply::Error, QPlaceReply::UnsupportedError),
- Q_ARG(QString, tr("Removing categories is not supported.")));
+ Q_ARG(QString, QCoreApplication::translate(NOKIA_PLUGIN_CONTEXT_NAME, REMOVING_CATEGORY_NOT_SUPPORTED)));
connect(reply, SIGNAL(finished()), this, SLOT(replyFinished()));
connect(reply, SIGNAL(error(QPlaceReply::Error,QString)),
this, SLOT(replyError(QPlaceReply::Error,QString)));
@@ -747,7 +749,7 @@ void QPlaceManagerEngineNokiaV2::categoryReplyFinished()
if (m_categoryReply) {
QMetaObject::invokeMethod(m_categoryReply.data(), "setError", Qt::QueuedConnection,
Q_ARG(QPlaceReply::Error, QPlaceReply::ParseError),
- Q_ARG(QString, tr("Error parsing response.")));
+ Q_ARG(QString, QCoreApplication::translate(NOKIA_PLUGIN_CONTEXT_NAME, PARSE_ERROR)));
}
return;
}
@@ -779,7 +781,7 @@ void QPlaceManagerEngineNokiaV2::categoryReplyError()
if (m_categoryReply) {
QMetaObject::invokeMethod(m_categoryReply.data(), "setError", Qt::QueuedConnection,
Q_ARG(QPlaceReply::Error, QPlaceReply::CommunicationError),
- Q_ARG(QString, tr("Network error.")));
+ Q_ARG(QString, QCoreApplication::translate(NOKIA_PLUGIN_CONTEXT_NAME, NETWORK_ERROR)));
}
}