summaryrefslogtreecommitdiff
path: root/src/location/maps
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2017-04-07 10:58:46 +0200
committerPaolo Angelelli <paolo.angelelli@qt.io>2017-04-12 08:57:14 +0000
commitb82f9dd722e21fd7694221147dc0dccc94b2ad60 (patch)
treefd6fb5762108d93cfb9cdc3d5433d2a3b0ca0269 /src/location/maps
parent9aa7d2849d3e89f855c46296a6d4c27cfae8c8b8 (diff)
downloadqtlocation-b82f9dd722e21fd7694221147dc0dccc94b2ad60.tar.gz
Replace QGeoMapType argument of cameraCapabilities
Since the only part of QGeoMapType used in the method is mapId, there's no need to pass the whole map type as argument. The benefit is that the camera caps can be requested solely based on the info in QGeoTileSpec. Change-Id: Iafd0e2a1d4d45fbf02b862efe56841001cbebd75 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/location/maps')
-rw-r--r--src/location/maps/qgeomap.cpp4
-rw-r--r--src/location/maps/qgeomappingmanagerengine.cpp4
-rw-r--r--src/location/maps/qgeomappingmanagerengine_p.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/location/maps/qgeomap.cpp b/src/location/maps/qgeomap.cpp
index 2419b79a..0c6ce0a7 100644
--- a/src/location/maps/qgeomap.cpp
+++ b/src/location/maps/qgeomap.cpp
@@ -110,7 +110,7 @@ void QGeoMap::setActiveMapType(const QGeoMapType type)
if (type == d->m_activeMapType)
return;
d->m_activeMapType = type;
- d->setCameraCapabilities(d->m_engine->cameraCapabilities(type)); // emits
+ d->setCameraCapabilities(d->m_engine->cameraCapabilities(type.mapId())); // emits
d->changeActiveMapType(type);
emit activeMapTypeChanged();
}
@@ -238,7 +238,7 @@ QGeoMapPrivate::QGeoMapPrivate(QGeoMappingManagerEngine *engine, QGeoProjection
{
// Setting the default camera caps without emitting anything
if (engine)
- m_cameraCapabilities = m_engine->cameraCapabilities(m_activeMapType);
+ m_cameraCapabilities = m_engine->cameraCapabilities(m_activeMapType.mapId());
}
QGeoMapPrivate::~QGeoMapPrivate()
diff --git a/src/location/maps/qgeomappingmanagerengine.cpp b/src/location/maps/qgeomappingmanagerengine.cpp
index a385f8ce..ffc0f065 100644
--- a/src/location/maps/qgeomappingmanagerengine.cpp
+++ b/src/location/maps/qgeomappingmanagerengine.cpp
@@ -150,9 +150,9 @@ void QGeoMappingManagerEngine::setSupportedMapTypes(const QList<QGeoMapType> &su
emit supportedMapTypesChanged();
}
-QGeoCameraCapabilities QGeoMappingManagerEngine::cameraCapabilities(const QGeoMapType &mapType) const
+QGeoCameraCapabilities QGeoMappingManagerEngine::cameraCapabilities(int mapId) const
{
- Q_UNUSED(mapType)
+ Q_UNUSED(mapId)
Q_D(const QGeoMappingManagerEngine);
return d->capabilities_;
}
diff --git a/src/location/maps/qgeomappingmanagerengine_p.h b/src/location/maps/qgeomappingmanagerengine_p.h
index b8ebb1ec..0f347d73 100644
--- a/src/location/maps/qgeomappingmanagerengine_p.h
+++ b/src/location/maps/qgeomappingmanagerengine_p.h
@@ -90,7 +90,7 @@ public:
QList<QGeoMapType> supportedMapTypes() const;
// the class is private, so this can be virtual here for now.
- virtual QGeoCameraCapabilities cameraCapabilities(const QGeoMapType &mapType) const;
+ virtual QGeoCameraCapabilities cameraCapabilities(int mapId = 0) const;
void setLocale(const QLocale &locale);
QLocale locale() const;