summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@theqtcompany.com>2016-05-25 13:07:37 +0200
committerPaolo Angelelli <paolo.angelelli@theqtcompany.com>2016-05-31 08:55:24 +0000
commit7ba211266c50f5c324a7cf22b3eb7d77dd123a91 (patch)
treea218e6e043db37104d5ad381e835a6540f840e9c /src
parentf897775850dfbe0e668e9c8b428537e8bb096c01 (diff)
downloadqtlocation-7ba211266c50f5c324a7cf22b3eb7d77dd123a91.tar.gz
Include childItems among the elements to check in populateMap()
QDeclarativeGeoMap::populateMap() currently considers only the children() of the map when populating the map. QQuickItems like the Repeater do not add the generated objects among the QObject children, but only to the QQuickItem childItems. Therefore populateMap() should consider both lists together. Task-number: QTBUG-52514 Change-Id: Ic919bc91c70242d6f5c4e67a63ff01482abed0ca Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/imports/location/qdeclarativegeomap.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/imports/location/qdeclarativegeomap.cpp b/src/imports/location/qdeclarativegeomap.cpp
index 80208a9b..2ef5d79d 100644
--- a/src/imports/location/qdeclarativegeomap.cpp
+++ b/src/imports/location/qdeclarativegeomap.cpp
@@ -381,6 +381,10 @@ QQuickGeoMapGestureArea *QDeclarativeGeoMap::gesture()
void QDeclarativeGeoMap::populateMap()
{
QObjectList kids = children();
+ QList<QQuickItem *> quickKids = childItems();
+ for (int i=0; i < quickKids.count(); ++i)
+ kids.append(quickKids.at(i));
+
for (int i = 0; i < kids.size(); ++i) {
// dispatch items appropriately
QDeclarativeGeoMapItemView *mapView = qobject_cast<QDeclarativeGeoMapItemView *>(kids.at(i));
@@ -432,7 +436,6 @@ QSGNode *QDeclarativeGeoMap::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeDa
return root;
}
-
/*!
\qmlproperty Plugin QtLocation::Map::plugin