summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative_core/tst_plugin.qml2
-rw-r--r--tests/auto/geotestplugin/geotestplugin.json3
-rw-r--r--tests/auto/geotestplugin/qgeoserviceproviderplugin_test.h4
-rw-r--r--tests/auto/geotestplugin/qplacemanagerengine_test.h9
-rw-r--r--tests/auto/utils/qlocationtestutils.cpp3
5 files changed, 13 insertions, 8 deletions
diff --git a/tests/auto/declarative_core/tst_plugin.qml b/tests/auto/declarative_core/tst_plugin.qml
index 7b880f1d..23c1ff9f 100644
--- a/tests/auto/declarative_core/tst_plugin.qml
+++ b/tests/auto/declarative_core/tst_plugin.qml
@@ -54,6 +54,7 @@ Item {
mapping: Plugin.OfflineMappingFeature;
geocoding: Plugin.OfflineGeocodingFeature;
places: Plugin.AnyPlacesFeatures;
+ navigation: Plugin.AnyNavigationFeatures;
}
}
@@ -120,6 +121,7 @@ Item {
verify(requiredPlugin.supportsMapping(requiredPlugin.required.mapping))
verify(requiredPlugin.supportsGeocoding(requiredPlugin.required.geocoding))
verify(requiredPlugin.supportsPlaces(requiredPlugin.required.places))
+ verify(requiredPlugin.supportsNavigation(requiredPlugin.required.navigation))
}
function test_placesFeatures() {
diff --git a/tests/auto/geotestplugin/geotestplugin.json b/tests/auto/geotestplugin/geotestplugin.json
index 52721715..f6218b67 100644
--- a/tests/auto/geotestplugin/geotestplugin.json
+++ b/tests/auto/geotestplugin/geotestplugin.json
@@ -14,6 +14,7 @@
"OfflinePlacesFeature",
"SavePlaceFeature",
"SaveCategoryFeature",
- "SearchSuggestionsFeature"
+ "SearchSuggestionsFeature",
+ "OfflineNavigationFeature"
]
}
diff --git a/tests/auto/geotestplugin/qgeoserviceproviderplugin_test.h b/tests/auto/geotestplugin/qgeoserviceproviderplugin_test.h
index c606fdb0..ac195d69 100644
--- a/tests/auto/geotestplugin/qgeoserviceproviderplugin_test.h
+++ b/tests/auto/geotestplugin/qgeoserviceproviderplugin_test.h
@@ -34,10 +34,10 @@
QT_USE_NAMESPACE
-class QGeoServiceProviderFactoryTest: public QObject, public QGeoServiceProviderFactory
+class QGeoServiceProviderFactoryTest: public QObject, public QGeoServiceProviderFactoryV2
{
Q_OBJECT
- Q_INTERFACES(QGeoServiceProviderFactory)
+ Q_INTERFACES(QGeoServiceProviderFactoryV2)
Q_PLUGIN_METADATA(IID "org.qt-project.qt.geoservice.serviceproviderfactory/5.0"
FILE "geotestplugin.json")
diff --git a/tests/auto/geotestplugin/qplacemanagerengine_test.h b/tests/auto/geotestplugin/qplacemanagerengine_test.h
index 7245ccf1..f015afe7 100644
--- a/tests/auto/geotestplugin/qplacemanagerengine_test.h
+++ b/tests/auto/geotestplugin/qplacemanagerengine_test.h
@@ -474,9 +474,12 @@ public:
results.append(r);
}
} else if (!query.categories().isEmpty()) {
- QSet<QPlaceCategory> categories = query.categories().toSet();
- foreach (const QPlace &place, m_places) {
- if (place.categories().toSet().intersect(categories).isEmpty())
+ const auto &categoryList = query.categories();
+ const QSet<QPlaceCategory> categories(categoryList.cbegin(), categoryList.cend());
+ for (const QPlace &place : qAsConst(m_places)) {
+ const auto &placeCategoryList = place.categories();
+ const QSet<QPlaceCategory> placeCategories(placeCategoryList.cbegin(), placeCategoryList.cend());
+ if (!placeCategories.intersects(categories))
continue;
QPlaceResult r;
diff --git a/tests/auto/utils/qlocationtestutils.cpp b/tests/auto/utils/qlocationtestutils.cpp
index d6e77855..df595daa 100644
--- a/tests/auto/utils/qlocationtestutils.cpp
+++ b/tests/auto/utils/qlocationtestutils.cpp
@@ -46,8 +46,7 @@ QString QLocationTestUtils::addNmeaChecksumAndBreaks(const QString &sentence)
int result = 0;
for (int i=1; i<sentence.length()-1; i++)
result ^= sentence[i].toLatin1();
- QString sum;
- sum.sprintf("%02x", result);
+ const QString sum = QString::asprintf("%02x", result);
return sentence + sum + "\r\n";
}