diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2011-06-10 13:35:50 +0200 |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2011-06-10 13:35:50 +0200 |
commit | 199635ad73b223cd993869ce088faef8d1ecad0c (patch) | |
tree | 4c42b0679c952367c452640d8cc0c660bad757d4 /src/declarative/items/qsgcanvas.cpp | |
parent | 71c9da36a71e5cac6312db97169fc641e5d274ea (diff) |
Added QSGNode::removeAllChildNodes().
Diffstat (limited to 'src/declarative/items/qsgcanvas.cpp')
-rw-r--r-- | src/declarative/items/qsgcanvas.cpp | 12 |
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; |