Commit d7402bff authored by Marco Bubke's avatar Marco Bubke
Browse files

QmlDesigner: Refactor allQmlItemsRecursive



Change-Id: If8b98e008e59de1eae87108a3256005fd85981b9
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 877f9081
......@@ -322,20 +322,18 @@ QList<QmlModelStateOperation> QmlObjectNode::allAffectingStatesOperations() cons
static QList<QmlItemNode> allQmlItemsRecursive(const QmlItemNode &qmlItemNode)
{
QList<QmlItemNode> returnList;
QList<QmlItemNode> qmlItemNodeList;
if (qmlItemNode.isValid()) {
returnList.append(qmlItemNode);
QList<QmlItemNode> allChildNodes;
foreach (const ModelNode &node, qmlItemNode.modelNode().allDirectSubModelNodes()) {
if (QmlItemNode::isValidQmlItemNode(node))
allChildNodes.append(node);
}
foreach (const QmlItemNode &node, allChildNodes) {
returnList.append(allQmlItemsRecursive(node));
qmlItemNodeList.append(qmlItemNode);
foreach (const ModelNode &modelNode, qmlItemNode.modelNode().allDirectSubModelNodes()) {
if (QmlItemNode::isValidQmlItemNode(modelNode))
qmlItemNodeList.append(allQmlItemsRecursive(modelNode));
}
}
return returnList;
return qmlItemNodeList;
}
QList<QmlModelState> QmlObjectNode::allDefinedStates() const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment