diff options
Diffstat (limited to 'src/plugins/geoservices/nokia/placesv2/jsonparserhelpers.cpp')
-rw-r--r-- | src/plugins/geoservices/nokia/placesv2/jsonparserhelpers.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/geoservices/nokia/placesv2/jsonparserhelpers.cpp b/src/plugins/geoservices/nokia/placesv2/jsonparserhelpers.cpp index 1a18d15d..ac294d6e 100644 --- a/src/plugins/geoservices/nokia/placesv2/jsonparserhelpers.cpp +++ b/src/plugins/geoservices/nokia/placesv2/jsonparserhelpers.cpp @@ -200,6 +200,7 @@ QPlaceEditorial parseEditorial(const QJsonObject &editorialObject, void parseCollection(QPlaceContent::Type type, const QJsonObject &object, QPlaceContent::Collection *collection, int *totalCount, + QPlaceContentRequest *previous, QPlaceContentRequest *next, const QPlaceManagerEngineNokiaV2 *engine) { Q_ASSERT(engine); @@ -211,6 +212,16 @@ void parseCollection(QPlaceContent::Type type, const QJsonObject &object, if (object.contains(QLatin1String("offset"))) offset = object.value(QLatin1String("offset")).toDouble(); + if (previous && object.contains(QStringLiteral("previous"))) { + previous->setContentType(type); + previous->setContentContext(QUrl(object.value(QStringLiteral("previous")).toString())); + } + + if (next && object.contains(QStringLiteral("next"))) { + next->setContentType(type); + next->setContentContext(QUrl(object.value(QStringLiteral("next")).toString())); + } + if (collection) { QJsonArray items = object.value(QLatin1String("items")).toArray(); for (int i = 0; i < items.count(); ++i) { |