diff options
4 files changed, 9 insertions, 18 deletions
diff --git a/src/location/declarativemaps/qdeclarativegeomap.cpp b/src/location/declarativemaps/qdeclarativegeomap.cpp index 09f9d01c..d8d01b66 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())); @@ -709,9 +709,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); @@ -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(); diff --git a/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp b/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp index c0d7f24b..e9f91e45 100644 --- a/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp +++ b/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp @@ -320,18 +320,9 @@ QDeclarativePolygonMapItem::QDeclarativePolygonMapItem(QQuickItem *parent) { setFlag(ItemHasContents, true); QObject::connect(&border_, SIGNAL(colorChanged(QColor)), - this, SLOT(handleBorderUpdated())); + this, SLOT(markSourceDirtyAndUpdate())); QObject::connect(&border_, SIGNAL(widthChanged(qreal)), - this, SLOT(handleBorderUpdated())); -} - -/*! - \internal -*/ -void QDeclarativePolygonMapItem::handleBorderUpdated() -{ - borderGeometry_.markSourceDirty(); - polishAndUpdate(); + this, SLOT(markSourceDirtyAndUpdate())); } QDeclarativePolygonMapItem::~QDeclarativePolygonMapItem() diff --git a/src/location/declarativemaps/qdeclarativepolygonmapitem_p.h b/src/location/declarativemaps/qdeclarativepolygonmapitem_p.h index 83983651..60e81b08 100644 --- a/src/location/declarativemaps/qdeclarativepolygonmapitem_p.h +++ b/src/location/declarativemaps/qdeclarativepolygonmapitem_p.h @@ -118,7 +118,6 @@ protected: protected Q_SLOTS: void markSourceDirtyAndUpdate(); - void handleBorderUpdated(); virtual void afterViewportChanged(const QGeoMapViewportChangeEvent &event) override; private: diff --git a/src/location/declarativemaps/qquickgeomapgesturearea.cpp b/src/location/declarativemaps/qquickgeomapgesturearea.cpp index c6f4b42f..576aeeea 100644 --- a/src/location/declarativemaps/qquickgeomapgesturearea.cpp +++ b/src/location/declarativemaps/qquickgeomapgesturearea.cpp @@ -1087,6 +1087,7 @@ void QQuickGeoMapGestureArea::update() m_allPoints << m_touchPoints; if (m_allPoints.isEmpty() && !m_mousePoint.isNull()) m_allPoints << *m_mousePoint.data(); + std::sort(m_allPoints.begin(), m_allPoints.end(), [](const QTouchEvent::TouchPoint &tp1, const QTouchEvent::TouchPoint &tp2) { return tp1.id() < tp2.id(); }); touchPointStateMachine(); |