aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/items/qsgcanvas.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/items/qsgcanvas.cpp')
-rw-r--r--src/declarative/items/qsgcanvas.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/declarative/items/qsgcanvas.cpp b/src/declarative/items/qsgcanvas.cpp
index 614c826563..f38e0b5ebc 100644
--- a/src/declarative/items/qsgcanvas.cpp
+++ b/src/declarative/items/qsgcanvas.cpp
@@ -1615,10 +1615,8 @@ void QSGCanvasPrivate::updateDirtyNode(QSGItem *item)
}
}
- if (dirty & QSGItemPrivate::ChildrenUpdateMask) {
- while (itemPriv->childContainerNode()->childCount())
- itemPriv->childContainerNode()->removeChildNode(itemPriv->childContainerNode()->childAtIndex(0));
- }
+ if (dirty & QSGItemPrivate::ChildrenUpdateMask)
+ itemPriv->childContainerNode()->removeAllChildNodes();
if (effectRefEffectivelyChanged) {
QSGNode *parent = itemPriv->clipNode;
@@ -1651,10 +1649,8 @@ void QSGCanvasPrivate::updateDirtyNode(QSGItem *item)
if (dirty & QSGItemPrivate::ChildrenUpdateMask) {
QSGNode *groupNode = itemPriv->groupNode;
- if (groupNode) {
- for (int count = groupNode->childCount(); count; --count)
- groupNode->removeChildNode(groupNode->childAtIndex(0));
- }
+ if (groupNode)
+ groupNode->removeAllChildNodes();
QList<QSGItem *> orderedChildren = itemPriv->paintOrderChildItems();
int ii = 0;