diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-04-12 15:21:03 +0200 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@qt.io> | 2017-05-07 07:02:12 +0000 |
commit | 1c29e3f36976134d1db3133d49ee3dc21eb1c07a (patch) | |
tree | dccc569a84a69fc6540b0a2fb27b19a0b4f75372 /tests/auto/geotestplugin/qgeotiledmappingmanagerengine_test.h | |
parent | acb1f42d21b94c4c783433c2e7d67646c905afb7 (diff) | |
download | qtlocation-1c29e3f36976134d1db3133d49ee3dc21eb1c07a.tar.gz |
Add pluginName to QGeoMapType and check against it in setActiveMapType
This patch adds a QByteArray member to QGeoMapType with the name of
the plugin providing that map type.
This value is then used to validate what is passed to
QDeclarativeGeoMap::setActiveMapType to see if it's a map type for the
currently set plugin.
Change-Id: If15b67c32150f0c3c2815d28e26fc37138d4cf71
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'tests/auto/geotestplugin/qgeotiledmappingmanagerengine_test.h')
-rw-r--r-- | tests/auto/geotestplugin/qgeotiledmappingmanagerengine_test.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/auto/geotestplugin/qgeotiledmappingmanagerengine_test.h b/tests/auto/geotestplugin/qgeotiledmappingmanagerengine_test.h index 94d1420a..5f6f0116 100644 --- a/tests/auto/geotestplugin/qgeotiledmappingmanagerengine_test.h +++ b/tests/auto/geotestplugin/qgeotiledmappingmanagerengine_test.h @@ -62,11 +62,12 @@ public: capabilities.setMaximumTilt(60); setTileSize(QSize(256, 256)); + const QByteArray pluginName = "qmlgeo.test.plugin"; QList<QGeoMapType> mapTypes; - mapTypes << QGeoMapType(QGeoMapType::StreetMap, tr("StreetMap"), tr("StreetMap"), false, false, 1); - mapTypes << QGeoMapType(QGeoMapType::SatelliteMapDay, tr("SatelliteMapDay"), tr("SatelliteMapDay"), false, false, 2); - mapTypes << QGeoMapType(QGeoMapType::CycleMap, tr("CycleMap"), tr("CycleMap"), false, false, 3); - mapTypes << QGeoMapType(QGeoMapType::CustomMap, tr("AlternateCameraCapabilities"), tr("AlternateCameraCapabilities"), false, false, 4); + mapTypes << QGeoMapType(QGeoMapType::StreetMap, tr("StreetMap"), tr("StreetMap"), false, false, 1, pluginName); + mapTypes << QGeoMapType(QGeoMapType::SatelliteMapDay, tr("SatelliteMapDay"), tr("SatelliteMapDay"), false, false, 2, pluginName); + mapTypes << QGeoMapType(QGeoMapType::CycleMap, tr("CycleMap"), tr("CycleMap"), false, false, 3, pluginName); + mapTypes << QGeoMapType(QGeoMapType::CustomMap, tr("AlternateCameraCapabilities"), tr("AlternateCameraCapabilities"), false, false, 4, pluginName); setSupportedMapTypes(mapTypes); QGeoTileFetcherTest *fetcher = new QGeoTileFetcherTest(this); |