summaryrefslogtreecommitdiff
path: root/tests/auto/qplacemanager_jsondb
diff options
context:
space:
mode:
authorAlex Wilson <alex.wilson@nokia.com>2012-02-28 13:05:02 +1000
committerQt by Nokia <qt-info@nokia.com>2012-03-05 04:22:24 +0100
commit0287bfee05840511c12100f06f9142e3e2b8f7d5 (patch)
treef5386e27a4b012877d37ab0b99dfc1d5a08705c5 /tests/auto/qplacemanager_jsondb
parentc1d56bdae90f79d466769aa7a357d78a4f2ca6c7 (diff)
downloadqtlocation-0287bfee05840511c12100f06f9142e3e2b8f7d5.tar.gz
New plugin API changes, centralized geoservice feature detection
This change adapts geoservice plugins to use the new Qt5 plugin API, performing boolean feature detection all through the JSON blobs rather than methods on factories or managers. As a result of this centralisation, it was also necessary to rework the QML API for the Plugin element a little. Some additional changes were made to the declarative places plugin to prevent it crashing due to plugins becoming available later than they did previously. Task-number: QTBUG-24331 Change-Id: I26149987344b67091480449103ab1712c869b2a5 Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'tests/auto/qplacemanager_jsondb')
-rw-r--r--tests/auto/qplacemanager_jsondb/tst_qplacemanager_jsondb.cpp23
1 files changed, 10 insertions, 13 deletions
diff --git a/tests/auto/qplacemanager_jsondb/tst_qplacemanager_jsondb.cpp b/tests/auto/qplacemanager_jsondb/tst_qplacemanager_jsondb.cpp
index 62a44e64..8763a4dd 100644
--- a/tests/auto/qplacemanager_jsondb/tst_qplacemanager_jsondb.cpp
+++ b/tests/auto/qplacemanager_jsondb/tst_qplacemanager_jsondb.cpp
@@ -1695,19 +1695,16 @@ void tst_QPlaceManagerJsonDb::unsupportedFunctions()
void tst_QPlaceManagerJsonDb::supportedFeatures()
{
- QCOMPARE((placeManager->supportedFeatures() & QPlaceManager::SavePlaceFeature),
- QPlaceManager::SavePlaceFeature);
- QCOMPARE((placeManager->supportedFeatures() & QPlaceManager::RemovePlaceFeature),
- QPlaceManager::RemovePlaceFeature);
- QCOMPARE((placeManager->supportedFeatures() & QPlaceManager::SaveCategoryFeature),
- QPlaceManager::SaveCategoryFeature);
- QCOMPARE((placeManager->supportedFeatures() & QPlaceManager::RemoveCategoryFeature),
- QPlaceManager::RemoveCategoryFeature);
-
- QVERIFY((placeManager->supportedFeatures() & QPlaceManager::RecommendationsFeature) == 0);
- QVERIFY((placeManager->supportedFeatures() & QPlaceManager::SearchSuggestionsFeature) == 0);
- QVERIFY((placeManager->supportedFeatures() & QPlaceManager::CorrectionsFeature) == 0);
- QVERIFY((placeManager->supportedFeatures() & QPlaceManager::LocaleFeature) == 0);
+ QGeoServiceProvider::PlacesFeatures f = QGeoServiceProvider::NoPlacesFeatures;
+
+ f |= QGeoServiceProvider::OfflinePlacesFeature;
+ f |= QGeoServiceProvider::SavePlaceFeature;
+ f |= QGeoServiceProvider::RemovePlaceFeature;
+ f |= QGeoServiceProvider::SaveCategoryFeature;
+ f |= QGeoServiceProvider::RemoveCategoryFeature;
+ f |= QGeoServiceProvider::PlaceMatchingFeature;
+
+ QCOMPARE(provider->placesFeatures(), f);
}
void tst_QPlaceManagerJsonDb::categoryFunctions()