summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/esri
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2017-04-12 15:21:03 +0200
committerJani Heikkinen <jani.heikkinen@qt.io>2017-05-07 07:02:12 +0000
commit1c29e3f36976134d1db3133d49ee3dc21eb1c07a (patch)
treedccc569a84a69fc6540b0a2fb27b19a0b4f75372 /src/plugins/geoservices/esri
parentacb1f42d21b94c4c783433c2e7d67646c905afb7 (diff)
downloadqtlocation-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 'src/plugins/geoservices/esri')
-rw-r--r--src/plugins/geoservices/esri/geomapsource.cpp2
-rw-r--r--src/plugins/geoservices/esri/geotiledmappingmanagerengine_esri.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/geoservices/esri/geomapsource.cpp b/src/plugins/geoservices/esri/geomapsource.cpp
index 32fe1899..19f284e6 100644
--- a/src/plugins/geoservices/esri/geomapsource.cpp
+++ b/src/plugins/geoservices/esri/geomapsource.cpp
@@ -68,7 +68,7 @@ static const MapStyleData mapStyles[] =
GeoMapSource::GeoMapSource(QGeoMapType::MapStyle style, const QString &name,
const QString &description, bool mobile, bool night, int mapId,
const QString &url, const QString &copyright) :
- QGeoMapType(style, name, description, mobile, night, mapId),
+ QGeoMapType(style, name, description, mobile, night, mapId, "esri"),
m_url(url), m_copyright(copyright)
{
}
diff --git a/src/plugins/geoservices/esri/geotiledmappingmanagerengine_esri.cpp b/src/plugins/geoservices/esri/geotiledmappingmanagerengine_esri.cpp
index 7a92ea23..00d17327 100644
--- a/src/plugins/geoservices/esri/geotiledmappingmanagerengine_esri.cpp
+++ b/src/plugins/geoservices/esri/geotiledmappingmanagerengine_esri.cpp
@@ -118,7 +118,8 @@ GeoTiledMappingManagerEngineEsri::GeoTiledMappingManagerEngineEsri(const QVarian
mapSource->description(),
mapSource->mobile(),
mapSource->night(),
- mapSource->mapId());
+ mapSource->mapId(),
+ "esri");
}
setSupportedMapTypes(mapTypes);