summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp5
-rw-r--r--src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.h2
-rw-r--r--src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp1
3 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp b/src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp
index 5bfbe6cf..8eca2eb8 100644
--- a/src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp
+++ b/src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp
@@ -136,6 +136,11 @@ void QPlaceDetailsReplyImpl::replyFinished()
case QNetworkReply::OperationCanceledError:
setError(CancelError, "Request canceled.");
break;
+ case QNetworkReply::ContentNotFoundError:
+ setError(PlaceDoesNotExistError,
+ QString::fromLatin1("The id, %1, does not reference an existing place")
+ .arg(m_placeId));
+ break;
default:
setError(CommunicationError, "Network error.");
}
diff --git a/src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.h b/src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.h
index 58770316..f7a91162 100644
--- a/src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.h
+++ b/src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.h
@@ -66,6 +66,7 @@ public:
~QPlaceDetailsReplyImpl();
void abort();
+ void setPlaceId(const QString &placeId) { m_placeId = placeId; }
private slots:
void setError(QPlaceReply::Error error_, const QString &errorString);
@@ -74,6 +75,7 @@ private slots:
private:
QNetworkReply *m_reply;
QPlaceManagerEngineNokiaV2 *m_engine;
+ QString m_placeId;
};
QT_END_NAMESPACE
diff --git a/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp b/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp
index b07ba600..6bca4c76 100644
--- a/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp
+++ b/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp
@@ -253,6 +253,7 @@ QPlaceDetailsReply *QPlaceManagerEngineNokiaV2::getPlaceDetails(const QString &p
QNetworkReply *networkReply = sendRequest(requestUrl);
QPlaceDetailsReplyImpl *reply = new QPlaceDetailsReplyImpl(networkReply, this);
+ reply->setPlaceId(placeId);
connect(reply, SIGNAL(finished()), this, SLOT(replyFinished()));
connect(reply, SIGNAL(error(QPlaceReply::Error,QString)),
this, SLOT(replyError(QPlaceReply::Error,QString)));