summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/nokia/places/qplacecategoriesreplyimpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/geoservices/nokia/places/qplacecategoriesreplyimpl.cpp')
-rw-r--r--src/plugins/geoservices/nokia/places/qplacecategoriesreplyimpl.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/plugins/geoservices/nokia/places/qplacecategoriesreplyimpl.cpp b/src/plugins/geoservices/nokia/places/qplacecategoriesreplyimpl.cpp
index e312813e..c17468f7 100644
--- a/src/plugins/geoservices/nokia/places/qplacecategoriesreplyimpl.cpp
+++ b/src/plugins/geoservices/nokia/places/qplacecategoriesreplyimpl.cpp
@@ -31,9 +31,14 @@ QPlaceCategoriesReplyImpl::~QPlaceCategoriesReplyImpl()
{
}
-QList<QPlaceCategory> QPlaceCategoriesReplyImpl::categories()
+QPlaceCategoryTree QPlaceCategoriesReplyImpl::categories() const
{
- return m_categories;
+ return m_categoryTree;
+}
+
+QList<QPlaceCategory> QPlaceCategoriesReplyImpl::categoriesFlat() const
+{
+ return m_categoryTree.toList();
}
void QPlaceCategoriesReplyImpl::abort()
@@ -61,7 +66,7 @@ void QPlaceCategoriesReplyImpl::resultReady(const QPlaceJSonParser::Error &error
const QString &errorMessage)
{
if (errorId == QPlaceJSonParser::NoError) {
- m_categories = parser->resultCategories();
+ m_categoryTree = parser->resultCategories();
} else if (errorId == QPlaceJSonParser::ParsingError) {
setError(ParseError, errorMessage);
emit error(this->error(), this->errorString());