summaryrefslogtreecommitdiff
path: root/src/location/declarativemaps
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli.qt@gmail.com>2020-01-05 21:13:53 +0100
committerpaolo <paolo.angelelli.qt@gmail.com>2020-01-18 14:38:53 +0100
commitf4a98904855b57c6ad42f9ead29737d0201b6733 (patch)
treef287e8fe100c4ec79369c77db3a49d99f3a8f5ca /src/location/declarativemaps
parent8e53b4913946801f5ba51807feda21778f264bf0 (diff)
downloadqtlocation-f4a98904855b57c6ad42f9ead29737d0201b6733.tar.gz
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 <alexander.blasche@qt.io>
Diffstat (limited to 'src/location/declarativemaps')
-rw-r--r--src/location/declarativemaps/qgeomapobject.cpp6
1 files changed, 4 insertions, 2 deletions
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);