summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/geoservices/nokia/placesv2/qplacesearchreplyimpl.cpp5
-rw-r--r--tests/auto/nokia_services/places_semiauto/tst_places.cpp2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/geoservices/nokia/placesv2/qplacesearchreplyimpl.cpp b/src/plugins/geoservices/nokia/placesv2/qplacesearchreplyimpl.cpp
index 8bcfd6a2..b82e3b20 100644
--- a/src/plugins/geoservices/nokia/placesv2/qplacesearchreplyimpl.cpp
+++ b/src/plugins/geoservices/nokia/placesv2/qplacesearchreplyimpl.cpp
@@ -103,6 +103,11 @@ void QPlaceSearchReplyImpl::replyFinished()
case QNetworkReply::OperationCanceledError:
setError(CancelError, QCoreApplication::translate(NOKIA_PLUGIN_CONTEXT_NAME, CANCEL_ERROR));
break;
+ case QNetworkReply::ContentNotFoundError:
+ setError(PlaceDoesNotExistError,
+ QString::fromLatin1("The id, %1, does not reference an existing place")
+ .arg(request().recommendationId()));
+ break;
default:
setError(CommunicationError, QCoreApplication::translate(NOKIA_PLUGIN_CONTEXT_NAME, NETWORK_ERROR));
}
diff --git a/tests/auto/nokia_services/places_semiauto/tst_places.cpp b/tests/auto/nokia_services/places_semiauto/tst_places.cpp
index 6d2e223a..f0f9cf1b 100644
--- a/tests/auto/nokia_services/places_semiauto/tst_places.cpp
+++ b/tests/auto/nokia_services/places_semiauto/tst_places.cpp
@@ -346,7 +346,7 @@ void tst_QPlaceManagerNokia::recommendations_data()
<< QString()
<< QGeoShape()
<< QList<QPlaceCategory>()
- << QPlaceReply::CommunicationError;
+ << QPlaceReply::PlaceDoesNotExistError;
QTest::newRow("search for recommendations with id and search term")
<< QString(AuvergneEmbassyId)