summaryrefslogtreecommitdiff
path: root/src/location/declarativemaps/qdeclarativegeomap.cpp
diff options
context:
space:
mode:
authorVille Voutilainen <ville.voutilainen@qt.io>2018-12-03 14:31:26 +0200
committerVille Voutilainen <ville.voutilainen@qt.io>2018-12-03 13:09:20 +0000
commit7bafbdc91f83165710ed74639b76b48b4494937a (patch)
treed0543c7aff01a68fede894c205bb258b8125e62a /src/location/declarativemaps/qdeclarativegeomap.cpp
parent4e2847bc1a86634d6d583b33a7e246ff4c58e03b (diff)
downloadqtlocation-7bafbdc91f83165710ed74639b76b48b4494937a.tar.gz
Fix compilation with gcc 4.8
GCC 4.8 doesn't like using QPointer in signal connections. Change-Id: I9504efb259712a65427ef1366ca562882085404e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/location/declarativemaps/qdeclarativegeomap.cpp')
-rw-r--r--src/location/declarativemaps/qdeclarativegeomap.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/location/declarativemaps/qdeclarativegeomap.cpp b/src/location/declarativemaps/qdeclarativegeomap.cpp
index b0adc54c..63587efe 100644
--- a/src/location/declarativemaps/qdeclarativegeomap.cpp
+++ b/src/location/declarativemaps/qdeclarativegeomap.cpp
@@ -360,7 +360,7 @@ void QDeclarativeGeoMap::initialize()
center.setLatitude(qBound(m_minimumViewportLatitude, center.latitude(), m_maximumViewportLatitude));
cameraData.setCenter(center);
- connect(m_map, &QGeoMap::cameraDataChanged,
+ connect(m_map.data(), &QGeoMap::cameraDataChanged,
this, &QDeclarativeGeoMap::onCameraDataChanged);
m_map->setCameraData(cameraData);
@@ -371,7 +371,7 @@ void QDeclarativeGeoMap::initialize()
if (visibleAreaHasChanged)
emit visibleAreaChanged();
- connect(m_map, &QGeoMap::visibleAreaChanged, this, &QDeclarativeGeoMap::visibleAreaChanged);
+ connect(m_map.data(), &QGeoMap::visibleAreaChanged, this, &QDeclarativeGeoMap::visibleAreaChanged);
emit mapReadyChanged(true);
@@ -657,11 +657,11 @@ void QDeclarativeGeoMap::mappingManagerInitialized()
QImage copyrightImage;
if (!m_initialized && width() > 0 && height() > 0) {
QMetaObject::Connection copyrightStringCatcherConnection =
- connect(m_map,
+ connect(m_map.data(),
QOverload<const QString &>::of(&QGeoMap::copyrightsChanged),
[&copyrightString](const QString &copy){ copyrightString = copy; });
QMetaObject::Connection copyrightImageCatcherConnection =
- connect(m_map,
+ connect(m_map.data(),
QOverload<const QImage &>::of(&QGeoMap::copyrightsChanged),
[&copyrightImage](const QImage &copy){ copyrightImage = copy; });
m_map->setViewportSize(QSize(width(), height()));
@@ -672,9 +672,9 @@ void QDeclarativeGeoMap::mappingManagerInitialized()
/* COPYRIGHT SIGNALS REWIRING */
- connect(m_map, SIGNAL(copyrightsChanged(QImage)),
+ connect(m_map.data(), SIGNAL(copyrightsChanged(QImage)),
this, SIGNAL(copyrightsChanged(QImage)));
- connect(m_map, SIGNAL(copyrightsChanged(QString)),
+ connect(m_map.data(), SIGNAL(copyrightsChanged(QString)),
this, SIGNAL(copyrightsChanged(QString)));
if (!copyrightString.isEmpty())
emit m_map->copyrightsChanged(copyrightString);
@@ -682,8 +682,8 @@ void QDeclarativeGeoMap::mappingManagerInitialized()
emit m_map->copyrightsChanged(copyrightImage);
- connect(m_map, &QGeoMap::sgNodeChanged, this, &QQuickItem::update);
- connect(m_map, &QGeoMap::cameraCapabilitiesChanged, this, &QDeclarativeGeoMap::onCameraCapabilitiesChanged);
+ connect(m_map.data(), &QGeoMap::sgNodeChanged, this, &QQuickItem::update);
+ connect(m_map.data(), &QGeoMap::cameraCapabilitiesChanged, this, &QDeclarativeGeoMap::onCameraCapabilitiesChanged);
// This prefetches a buffer around the map
m_map->prefetchData();