kumquat-buildroot/package/qt5/qt5location/5.11.2/0001-qdeclarativegeomap-fix-building-with-GCC-5.x.patch
Peter Seiderer 63aadf1009 qt5: bump latest version to 5.11.2
- qt5canvas3d: update license info
- qt5serialbus: update license hash (LICENSE.FDL editorial change, see [1])
- qt5serialport: update license hash (LICENSE.FDL editorial change, see [2])

[1] https://code.qt.io/cgit/qt/qtserialbus.git/commit/?id=226bd2f84c807b5401a82832dafa48d34966052a
[2] https://code.qt.io/cgit/qt/qtserialport.git/commit/?id=e0bd3949c30ce9c1988a6d6a3c0850d16a1fb33a

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-09-30 20:00:00 +02:00

49 lines
2.3 KiB
Diff

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),
[&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()));
@@ -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