diff options
author | Ville Voutilainen <ville.voutilainen@qt.io> | 2018-12-03 14:31:26 +0200 |
---|---|---|
committer | Ville Voutilainen <ville.voutilainen@qt.io> | 2018-12-03 13:09:20 +0000 |
commit | 7bafbdc91f83165710ed74639b76b48b4494937a (patch) | |
tree | d0543c7aff01a68fede894c205bb258b8125e62a | |
parent | 4e2847bc1a86634d6d583b33a7e246ff4c58e03b (diff) | |
download | qtlocation-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>
-rw-r--r-- | src/location/declarativemaps/qdeclarativegeomap.cpp | 16 | ||||
-rw-r--r-- | src/location/maps/qgeomap_p.h | 1 | ||||
-rw-r--r-- | src/plugins/position/geoclue2/qgeopositioninfosource_geoclue2.cpp | 2 |
3 files changed, 9 insertions, 10 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), [©rightString](const QString ©){ copyrightString = copy; }); QMetaObject::Connection copyrightImageCatcherConnection = - connect(m_map, + connect(m_map.data(), QOverload<const QImage &>::of(&QGeoMap::copyrightsChanged), [©rightImage](const QImage ©){ 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(); diff --git a/src/location/maps/qgeomap_p.h b/src/location/maps/qgeomap_p.h index f19f847a..874b300f 100644 --- a/src/location/maps/qgeomap_p.h +++ b/src/location/maps/qgeomap_p.h @@ -177,7 +177,6 @@ Q_SIGNALS: private: Q_DISABLE_COPY(QGeoMap) friend class QDeclarativeGeoMap; //updateSceneGraph - friend class QGeoMapPrivate; }; Q_DECLARE_OPERATORS_FOR_FLAGS(QGeoMap::ItemTypes) diff --git a/src/plugins/position/geoclue2/qgeopositioninfosource_geoclue2.cpp b/src/plugins/position/geoclue2/qgeopositioninfosource_geoclue2.cpp index cd514d30..10484e3b 100644 --- a/src/plugins/position/geoclue2/qgeopositioninfosource_geoclue2.cpp +++ b/src/plugins/position/geoclue2/qgeopositioninfosource_geoclue2.cpp @@ -264,7 +264,7 @@ void QGeoPositionInfoSourceGeoclue2::createClient() setError(AccessError); delete m_client; } else { - connect(m_client, &OrgFreedesktopGeoClue2ClientInterface::LocationUpdated, + connect(m_client.data(), &OrgFreedesktopGeoClue2ClientInterface::LocationUpdated, this, &QGeoPositionInfoSourceGeoclue2::handleNewLocation); if (configureClient()) |