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 <thomas.hartmann@qt.io>
This commit is contained in:
Marco Bubke
2022-08-31 10:26:03 +02:00
parent 563e055c5a
commit 7ffb66ade2

View File

@@ -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;
}
}