diff options
12 files changed, 20 insertions, 20 deletions
diff --git a/doc/src/places.qdoc b/doc/src/places.qdoc index 4561b61e..ff6e297e 100644 --- a/doc/src/places.qdoc +++ b/doc/src/places.qdoc @@ -190,7 +190,7 @@ \o QPlaceManager::childCategories() \o QPlaceManager::category() \o QPlaceManager::parentCategoryId() - \o QPlaceManager::childrenCategoryIds(); + \o QPlaceManager::childCategoryIds(); \endlist To retrieve the top level categories diff --git a/src/imports/location/declarativeplaces/qdeclarativesearchmodelbase.cpp b/src/imports/location/declarativeplaces/qdeclarativesearchmodelbase.cpp index 8230ccfb..5c511230 100644 --- a/src/imports/location/declarativeplaces/qdeclarativesearchmodelbase.cpp +++ b/src/imports/location/declarativeplaces/qdeclarativesearchmodelbase.cpp @@ -217,7 +217,7 @@ void QDeclarativeSearchModelBase::initializePlugin(QDeclarativeGeoServiceProvide if (serviceProvider) { QPlaceManager *placeManager = serviceProvider->placeManager(); if (placeManager) { - if (placeManager->childrenCategoryIds().isEmpty()) { + if (placeManager->childCategoryIds().isEmpty()) { QPlaceReply *reply = placeManager->initializeCategories(); connect(reply, SIGNAL(finished()), reply, SLOT(deleteLater())); } diff --git a/src/location/places/qplacemanager.cpp b/src/location/places/qplacemanager.cpp index 49222333..93bffd5b 100644 --- a/src/location/places/qplacemanager.cpp +++ b/src/location/places/qplacemanager.cpp @@ -122,7 +122,7 @@ QT_BEGIN_NAMESPACE \o QPlaceManager::childCategories() \o QPlaceManager::category() \o QPlaceManager::parentCategoryId() - \o QPlaceManager::childrenCategoryIds(); + \o QPlaceManager::childCategoryIds(); \endlist If the categories need to be refreshed or reloaded, the initializeCategories() function @@ -325,12 +325,12 @@ QString QPlaceManager::parentCategoryId(const QString &categoryId) const } /*! - Returns the children category ids of the category corresponding to \a categoryId. - If \a categoryId is empty then all top level category ids are returned. + Returns the child category ids of the category corresponding to \a parentId. + If \a parentId is empty then all top level category ids are returned. */ -QStringList QPlaceManager::childrenCategoryIds(const QString &categoryId) const +QStringList QPlaceManager::childCategoryIds(const QString &parentId) const { - return d->childrenCategoryIds(categoryId); + return d->childCategoryIds(parentId); } /*! diff --git a/src/location/places/qplacemanager.h b/src/location/places/qplacemanager.h index 7ea3d388..1fe2d553 100644 --- a/src/location/places/qplacemanager.h +++ b/src/location/places/qplacemanager.h @@ -112,7 +112,7 @@ public: QPlaceReply *initializeCategories(); QString parentCategoryId(const QString &categoryId) const; - QStringList childrenCategoryIds(const QString &categoryId = QString()) const; + QStringList childCategoryIds(const QString &parentId = QString()) const; QPlaceCategory category(const QString &categoryId) const; QList<QPlaceCategory> childCategories(const QString &parentId = QString()) const; diff --git a/src/location/places/qplacemanagerengine.cpp b/src/location/places/qplacemanagerengine.cpp index 524fa89e..dd481f73 100644 --- a/src/location/places/qplacemanagerengine.cpp +++ b/src/location/places/qplacemanagerengine.cpp @@ -262,10 +262,10 @@ QPlaceManagerEnginePrivate::~QPlaceManagerEnginePrivate() */ /*! - \fn QStringList QPlaceManagerEngine::childrenCategoryIds(const QString &categoryId) const + \fn QStringList QPlaceManagerEngine::childCategoryIds(const QString &parentId) const - Returns the children category ids of the category corresponding to \a categoryId. - If \a categoryId is empty then all top level category ids are returned. + Returns the child category ids of the category corresponding to \a parentId. + If \a parentId is empty then all top level category ids are returned. */ /*! diff --git a/src/location/places/qplacemanagerengine.h b/src/location/places/qplacemanagerengine.h index 9dc4d089..607c8b96 100644 --- a/src/location/places/qplacemanagerengine.h +++ b/src/location/places/qplacemanagerengine.h @@ -80,7 +80,7 @@ public: virtual QPlaceReply *initializeCategories() = 0; virtual QString parentCategoryId(const QString &categoryId) const = 0; - virtual QStringList childrenCategoryIds(const QString &categoryId) const = 0; + virtual QStringList childCategoryIds(const QString &categoryId) const = 0; virtual QPlaceCategory category(const QString &categoryId) const = 0; virtual QList<QPlaceCategory> childCategories(const QString &parentId) const = 0; diff --git a/src/plugins/geoservices/nokia/qplacemanagerengine_nokia.cpp b/src/plugins/geoservices/nokia/qplacemanagerengine_nokia.cpp index 8c8831ad..aaf57c1f 100644 --- a/src/plugins/geoservices/nokia/qplacemanagerengine_nokia.cpp +++ b/src/plugins/geoservices/nokia/qplacemanagerengine_nokia.cpp @@ -283,7 +283,7 @@ QString QPlaceManagerEngineNokia::parentCategoryId(const QString &categoryId) co return tree.value(categoryId).parentId; } -QStringList QPlaceManagerEngineNokia::childrenCategoryIds(const QString &categoryId) const +QStringList QPlaceManagerEngineNokia::childCategoryIds(const QString &categoryId) const { QPlaceCategoryTree tree = QPlaceCategoriesRepository::instance()->categories(); return tree.value(categoryId).childIds; diff --git a/src/plugins/geoservices/nokia/qplacemanagerengine_nokia.h b/src/plugins/geoservices/nokia/qplacemanagerengine_nokia.h index 8df05753..fc6e41e0 100644 --- a/src/plugins/geoservices/nokia/qplacemanagerengine_nokia.h +++ b/src/plugins/geoservices/nokia/qplacemanagerengine_nokia.h @@ -83,7 +83,7 @@ public: QPlaceReply *initializeCategories(); QString parentCategoryId(const QString &categoryId) const; - QStringList childrenCategoryIds(const QString &categoryId) const; + QStringList childCategoryIds(const QString &categoryId) const; QPlaceCategory category(const QString &categoryId) const; QList<QPlaceCategory> childCategories(const QString &parentId) const; diff --git a/src/plugins/geoservices/nokia_places_jsondb/qplacemanagerengine_jsondb.cpp b/src/plugins/geoservices/nokia_places_jsondb/qplacemanagerengine_jsondb.cpp index 9c1a3ec8..853f56f2 100644 --- a/src/plugins/geoservices/nokia_places_jsondb/qplacemanagerengine_jsondb.cpp +++ b/src/plugins/geoservices/nokia_places_jsondb/qplacemanagerengine_jsondb.cpp @@ -188,7 +188,7 @@ QString QPlaceManagerEngineJsonDb::parentCategoryId(const QString &categoryId) c .first().toMap().value(JsonConverter::CategoryParentId).toString(); } -QStringList QPlaceManagerEngineJsonDb::childrenCategoryIds(const QString &categoryId) const +QStringList QPlaceManagerEngineJsonDb::childCategoryIds(const QString &categoryId) const { QStringList result; QList<QPlaceCategory> children = childCategories(categoryId); diff --git a/src/plugins/geoservices/nokia_places_jsondb/qplacemanagerengine_jsondb.h b/src/plugins/geoservices/nokia_places_jsondb/qplacemanagerengine_jsondb.h index 7eef23f7..faf0a9c9 100644 --- a/src/plugins/geoservices/nokia_places_jsondb/qplacemanagerengine_jsondb.h +++ b/src/plugins/geoservices/nokia_places_jsondb/qplacemanagerengine_jsondb.h @@ -87,7 +87,7 @@ public: QPlaceReply *initializeCategories(); QString parentCategoryId(const QString &categoryId) const; - QStringList childrenCategoryIds(const QString &categoryId) const; + QStringList childCategoryIds(const QString &categoryId) const; QPlaceCategory category(const QString &categoryId) const; QList<QPlaceCategory> childCategories(const QString &parentId) const; diff --git a/tests/auto/geotestplugin/qplacemanagerengine_test.h b/tests/auto/geotestplugin/qplacemanagerengine_test.h index f634b57f..b36913d1 100644 --- a/tests/auto/geotestplugin/qplacemanagerengine_test.h +++ b/tests/auto/geotestplugin/qplacemanagerengine_test.h @@ -328,7 +328,7 @@ public: return QString(); } - virtual QStringList childrenCategoryIds(const QString &categoryId) const + virtual QStringList childCategoryIds(const QString &categoryId) const { return m_childCategories.value(categoryId); } diff --git a/tests/auto/qplacemanager_jsondb/tst_qplacemanager_jsondb.cpp b/tests/auto/qplacemanager_jsondb/tst_qplacemanager_jsondb.cpp index 0499e382..2900b935 100644 --- a/tests/auto/qplacemanager_jsondb/tst_qplacemanager_jsondb.cpp +++ b/tests/auto/qplacemanager_jsondb/tst_qplacemanager_jsondb.cpp @@ -1207,16 +1207,16 @@ void tst_QPlaceManagerJsonDb::categoryFunctions() QCOMPARE(placeManager->parentCategoryId(QLatin1String("does-not-exist")), QString()); //try find the child ids - QStringList childIds = placeManager->childrenCategoryIds(restaurant.categoryId()); + QStringList childIds = placeManager->childCategoryIds(restaurant.categoryId()); QVERIFY(childIds.contains(fastFood.categoryId())); QVERIFY(childIds.contains(fineDining.categoryId())); QCOMPARE(childIds.count(), 2); //try find the child id of a category without a child - QCOMPARE(placeManager->childrenCategoryIds(fineDining.categoryId()), QStringList()); + QCOMPARE(placeManager->childCategoryIds(fineDining.categoryId()), QStringList()); //try to find child ids of a non-existent category - QCOMPARE(placeManager->childrenCategoryIds(QLatin1String("does-not-exist")), QStringList()); + QCOMPARE(placeManager->childCategoryIds(QLatin1String("does-not-exist")), QStringList()); //try to find a category by it's id QCOMPARE(placeManager->category(fastFood.categoryId()), fastFood); |