summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/nokia/placesv2/jsonparserhelpers.cpp
diff options
context:
space:
mode:
authorabcd <amos.choy@nokia.com>2012-03-17 14:46:47 +1000
committerQt by Nokia <qt-info@nokia.com>2012-03-19 07:39:22 +0100
commit9662df2e86278e2f8b3d370d5f205b70334f04c9 (patch)
tree63fcb4aa1ea2484bc92d9385eae53449882f4c39 /src/plugins/geoservices/nokia/placesv2/jsonparserhelpers.cpp
parent1fcc1fac4c1c949498c75d21ba784288115f2a25 (diff)
downloadqtlocation-9662df2e86278e2f8b3d370d5f205b70334f04c9.tar.gz
Fix clipped category ids from v2 engine
Change-Id: Id82447fd162ed94fb51283ff4855d4b048f0051a Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'src/plugins/geoservices/nokia/placesv2/jsonparserhelpers.cpp')
-rw-r--r--src/plugins/geoservices/nokia/placesv2/jsonparserhelpers.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/geoservices/nokia/placesv2/jsonparserhelpers.cpp b/src/plugins/geoservices/nokia/placesv2/jsonparserhelpers.cpp
index a201bb73..cf040b3b 100644
--- a/src/plugins/geoservices/nokia/placesv2/jsonparserhelpers.cpp
+++ b/src/plugins/geoservices/nokia/placesv2/jsonparserhelpers.cpp
@@ -84,7 +84,8 @@ QPlaceCategory parseCategory(const QJsonObject &categoryObject)
category.setName(categoryObject.value(QLatin1String("title")).toString());
const QUrl href(categoryObject.value(QLatin1String("href")).toString());
- category.setCategoryId(href.path().mid(34));
+ const QString hrefPath(href.path());
+ category.setCategoryId(hrefPath.mid(hrefPath.lastIndexOf(QLatin1Char('/')) + 1));
QVariantMap parameters;
parameters.insert(QPlaceIcon::SingleUrl,