|
@@ -0,0 +1,48 @@
|
|
|
+From ad78b1a671edac369ede86bff376ec8af2cafbf2 Mon Sep 17 00:00:00 2001
|
|
|
+From: Giulio Benetti <giulio.benetti@micronovasrl.com>
|
|
|
+Date: Wed, 5 Sep 2018 12:51:41 +0200
|
|
|
+Subject: [PATCH] qdeclarativegeomap: fix building with GCC < 5.x
|
|
|
+
|
|
|
+With GCC < 5.x implicit casts don't work as expected, in particular
|
|
|
+QPointer<QGeoMap> in m_map QDeclarativeGeoMap class when passed to
|
|
|
+connect(m_map, ...) should directly cast to m_map.data().
|
|
|
+
|
|
|
+Workaround this using connect(m_map.data(), ...).
|
|
|
+
|
|
|
+Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
|
|
|
+---
|
|
|
+ src/location/declarativemaps/qdeclarativegeomap.cpp | 8 ++++----
|
|
|
+ 1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
+
|
|
|
+diff --git a/src/location/declarativemaps/qdeclarativegeomap.cpp b/src/location/declarativemaps/qdeclarativegeomap.cpp
|
|
|
+index 09f9d01c..dc5a32ed 100644
|
|
|
+--- a/src/location/declarativemaps/qdeclarativegeomap.cpp
|
|
|
++++ b/src/location/declarativemaps/qdeclarativegeomap.cpp
|
|
|
+@@ -694,11 +694,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()));
|
|
|
+@@ -719,8 +719,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();
|
|
|
+--
|
|
|
+2.17.1
|
|
|
+
|