summaryrefslogtreecommitdiff
path: root/src/location/declarativemaps/qdeclarativepolylinemapitem.cpp
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2019-01-21 15:50:52 +0100
committerPaolo Angelelli <paolo.angelelli@qt.io>2019-01-29 18:56:52 +0000
commit1ac41150501d3c5cc4a9a6ed9c93729687666553 (patch)
tree885594e1dca7cfe9c739fd036c108d4ab0d9bf07 /src/location/declarativemaps/qdeclarativepolylinemapitem.cpp
parentdba67b9f0130dd680dc728524323af664158e230 (diff)
downloadqtlocation-1ac41150501d3c5cc4a9a6ed9c93729687666553.tar.gz
Fix crash when removing items from MapboxGL maps
Triggered by usage of a virtual method in superclass destructor. Change-Id: If99e523e42fd13686ae43c0083a74e1b68221fc7 Fixes: QTBUG-67638 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/location/declarativemaps/qdeclarativepolylinemapitem.cpp')
-rw-r--r--src/location/declarativemaps/qdeclarativepolylinemapitem.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/location/declarativemaps/qdeclarativepolylinemapitem.cpp b/src/location/declarativemaps/qdeclarativepolylinemapitem.cpp
index 2bed0896..1751dedd 100644
--- a/src/location/declarativemaps/qdeclarativepolylinemapitem.cpp
+++ b/src/location/declarativemaps/qdeclarativepolylinemapitem.cpp
@@ -739,6 +739,7 @@ bool QGeoMapPolylineGeometry::contains(const QPointF &point) const
QDeclarativePolylineMapItem::QDeclarativePolylineMapItem(QQuickItem *parent)
: QDeclarativeGeoMapItemBase(parent), line_(this), dirtyMaterial_(true), updatingGeometry_(false)
{
+ m_itemType = QGeoMap::MapPolyline;
geopath_ = QGeoPathEager();
setFlag(ItemHasContents, true);
QObject::connect(&line_, SIGNAL(colorChanged(QColor)),
@@ -1141,11 +1142,6 @@ void QDeclarativePolylineMapItem::setGeoShape(const QGeoShape &shape)
setPath(geopath);
}
-QGeoMap::ItemType QDeclarativePolylineMapItem::itemType() const
-{
- return QGeoMap::MapPolyline;
-}
-
//////////////////////////////////////////////////////////////////////
/*!