Commit 9a8f5383 authored by Marco Bubke's avatar Marco Bubke
Browse files

QmlDesigner: Improve short name



Change-Id: I773964fac0b4981a9d33bc047b8e5e9599c2a3b0
Reviewed-by: default avatarTim Jenssen <tim.jenssen@digia.com>
parent f2e73c78
......@@ -38,17 +38,17 @@
using namespace QmlDesigner;
using namespace QmlDesigner::Internal;
static bool nodeOrParentInSet(const ModelNode &node, const QSet<ModelNode> &nodeSet)
static bool nodeOrParentInSet(const ModelNode &modelNode, const QSet<ModelNode> &nodeSet)
{
ModelNode n = node;
while (n.isValid()) {
if (nodeSet.contains(n))
ModelNode currentModelnode = modelNode;
while (currentModelnode.isValid()) {
if (nodeSet.contains(currentModelnode))
return true;
if (!n.hasParentProperty())
if (!currentModelnode.hasParentProperty())
return false;
n = n.parentProperty().parentModelNode();
currentModelnode = currentModelnode.parentProperty().parentModelNode();
}
return false;
......
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