diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2019-01-21 15:50:52 +0100 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2019-01-29 18:56:52 +0000 |
commit | 1ac41150501d3c5cc4a9a6ed9c93729687666553 (patch) | |
tree | 885594e1dca7cfe9c739fd036c108d4ab0d9bf07 /src/location/declarativemaps/qdeclarativerectanglemapitem.cpp | |
parent | dba67b9f0130dd680dc728524323af664158e230 (diff) | |
download | qtlocation-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/qdeclarativerectanglemapitem.cpp')
-rw-r--r-- | src/location/declarativemaps/qdeclarativerectanglemapitem.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/location/declarativemaps/qdeclarativerectanglemapitem.cpp b/src/location/declarativemaps/qdeclarativerectanglemapitem.cpp index ba67ecad..74f95734 100644 --- a/src/location/declarativemaps/qdeclarativerectanglemapitem.cpp +++ b/src/location/declarativemaps/qdeclarativerectanglemapitem.cpp @@ -118,6 +118,7 @@ QDeclarativeRectangleMapItem::QDeclarativeRectangleMapItem(QQuickItem *parent) : QDeclarativeGeoMapItemBase(parent), border_(this), color_(Qt::transparent), dirtyMaterial_(true), updatingGeometry_(false) { + m_itemType = QGeoMap::MapRectangle; setFlag(ItemHasContents, true); QObject::connect(&border_, SIGNAL(colorChanged(QColor)), this, SLOT(markSourceDirtyAndUpdate())); @@ -370,11 +371,6 @@ void QDeclarativeRectangleMapItem::setGeoShape(const QGeoShape &shape) emit bottomRightChanged(rectangle_.bottomRight()); } -QGeoMap::ItemType QDeclarativeRectangleMapItem::itemType() const -{ - return QGeoMap::MapRectangle; -} - /*! \internal */ |