From 7ffb66ade2db20719e7c69469dfab9a395c238ce Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Wed, 31 Aug 2022 10:26:03 +0200 Subject: [PATCH] QmlDesigner: Use new validation approach in path tool Many validation tests can now be skipped. Task-number: QDS-7454 Change-Id: I77ee17ff2abdfbbcc3c6db751f0296b3935ae8e0 Reviewed-by: Thomas Hartmann --- .../components/pathtool/pathtoolview.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/plugins/qmldesigner/components/pathtool/pathtoolview.cpp b/src/plugins/qmldesigner/components/pathtool/pathtoolview.cpp index b6d30acfd87..20538573148 100644 --- a/src/plugins/qmldesigner/components/pathtool/pathtoolview.cpp +++ b/src/plugins/qmldesigner/components/pathtool/pathtoolview.cpp @@ -21,13 +21,12 @@ PathToolView::PathToolView(PathTool *pathTool) static bool isInEditedPath(const NodeAbstractProperty &propertyParent, const ModelNode &editingPathViewModelNode) { - if (editingPathViewModelNode.isValid()) { - if (editingPathViewModelNode.hasNodeProperty("path")) { - ModelNode pathModelNode = editingPathViewModelNode.nodeProperty("path").modelNode(); - if (pathModelNode.metaInfo().isQtQuickPath()) { - if (propertyParent.name() == "pathElements" && propertyParent.parentModelNode() == pathModelNode) - return true; - } + if (editingPathViewModelNode.hasNodeProperty("path")) { + ModelNode pathModelNode = editingPathViewModelNode.nodeProperty("path").modelNode(); + if (pathModelNode.metaInfo().isQtQuickPath()) { + if (propertyParent.name() == "pathElements" + && propertyParent.parentModelNode() == pathModelNode) + return true; } }