summaryrefslogtreecommitdiff
path: root/src/location/maps/qgeomap.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-07-27 23:24:20 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-07-28 16:53:24 +0200
commit46c9adfd30636a4b13f5b66bbe019e51033a5f0b (patch)
treee53a9cd098f3561c7fb6b0d5007e0df999a3fec7 /src/location/maps/qgeomap.cpp
parentfc78a32507ccaa6c101dca2cc7a4d4061acea94f (diff)
downloadqtlocation-46c9adfd30636a4b13f5b66bbe019e51033a5f0b.tar.gz
Use 'const' correctly
Don't return or pass const copies, use either plain copies or const references. Make getters const, make variables const, and use qAsConst in ranged for loops to avoid detaches. Pick-to: 6.2 Change-Id: If1463cf7f0077c08dedb15388d912b652c2b037c Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Diffstat (limited to 'src/location/maps/qgeomap.cpp')
-rw-r--r--src/location/maps/qgeomap.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/location/maps/qgeomap.cpp b/src/location/maps/qgeomap.cpp
index 9766a5b7..f6b3edca 100644
--- a/src/location/maps/qgeomap.cpp
+++ b/src/location/maps/qgeomap.cpp
@@ -157,7 +157,7 @@ const QGeoCameraData &QGeoMap::cameraData() const
return d->m_cameraData;
}
-void QGeoMap::setActiveMapType(const QGeoMapType type)
+void QGeoMap::setActiveMapType(const QGeoMapType &type)
{
Q_D(QGeoMap);
if (type == d->m_activeMapType)
@@ -168,7 +168,7 @@ void QGeoMap::setActiveMapType(const QGeoMapType type)
emit activeMapTypeChanged();
}
-const QGeoMapType QGeoMap::activeMapType() const
+QGeoMapType QGeoMap::activeMapType() const
{
Q_D(const QGeoMap);
return d->m_activeMapType;