diff options
Diffstat (limited to 'src/declarative/scenegraph/coreapi/qsgnode.cpp')
-rw-r--r-- | src/declarative/scenegraph/coreapi/qsgnode.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/declarative/scenegraph/coreapi/qsgnode.cpp b/src/declarative/scenegraph/coreapi/qsgnode.cpp index b0a5f04035..347aad61bc 100644 --- a/src/declarative/scenegraph/coreapi/qsgnode.cpp +++ b/src/declarative/scenegraph/coreapi/qsgnode.cpp @@ -305,7 +305,7 @@ void QSGNode::insertChildNodeAfter(QSGNode *node, QSGNode *after) /*! - Removes \a node fromt his node's list of children. + Removes \a node from this node's list of children. */ void QSGNode::removeChildNode(QSGNode *node) @@ -321,6 +321,20 @@ void QSGNode::removeChildNode(QSGNode *node) /*! + Removes all child nodes from this node's list of children. + */ + +void QSGNode::removeAllChildNodes() +{ + while (!m_children.isEmpty()) { + QSGNode *node = m_children.takeLast(); + node->markDirty(DirtyNodeRemoved); + node->m_parent = 0; + } +} + + +/*! Sets the flag \a f on this node if \a enabled is true; otherwise clears the flag. |