From f4a98904855b57c6ad42f9ead29737d0201b6733 Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Sun, 5 Jan 2020 21:13:53 +0100 Subject: Fix MapObjectView not setting properties Set parent for incubated objects in MapObjectView to the view. Also properly set component completed when removing the view from a map and then readding it. Finally silence the useless warning about MapObjectView being unsupported, as the default MOV is basically what's wanted. Change-Id: Iecbc345ced99754d0d09112b4b30eaca2bb078e5 Reviewed-by: Alex Blasche --- src/location/declarativemaps/qgeomapobject.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/location/declarativemaps') diff --git a/src/location/declarativemaps/qgeomapobject.cpp b/src/location/declarativemaps/qgeomapobject.cpp index 00faac9b..b0a10806 100644 --- a/src/location/declarativemaps/qgeomapobject.cpp +++ b/src/location/declarativemaps/qgeomapobject.cpp @@ -193,8 +193,10 @@ void QGeoMapObject::setMap(QGeoMap *map) if (map) { bool oldVisible = d_ptr->m_visible; bool oldCmponentCompleted = d_ptr->m_componentCompleted; - if (!map->createMapObjectImplementation(this)) - qWarning() << "Unsupported type " << type(); + if (!map->createMapObjectImplementation(this)) { + if (type() != ViewType) + qWarning() << "Unsupported type " << type(); + } // old implementation gets destroyed if/when d_ptr gets replaced d_ptr->m_componentCompleted = oldCmponentCompleted; d_ptr->setVisible(oldVisible); -- cgit v1.2.1