From 4a697a60995bb225df28eeb6d78a37da9c41f840 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Sat, 24 May 2025 14:55:14 +0200 Subject: [PATCH] QmlDesigner: Improve is valid check There are many keys and the check for an item is expensive. There will be no form editor item in scene for non qml items. So there is no need to check it. Change-Id: I31888f7d9f3b487e6c8181c40d9126446e8288ad Reviewed-by: Thomas Hartmann --- .../qmldesigner/components/formeditor/formeditorview.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp index f6eb02ed81a..572436c4b40 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp @@ -721,9 +721,10 @@ void FormEditorView::instanceInformationsChanged(const QMultiHash changedItems; - QList informationChangedNodes = Utils::filtered( - informationChangedHash.keys(), - [](const ModelNode &node) { return QmlItemNode::isValidQmlItemNode(node); }); + QList informationChangedNodes = Utils::filtered(informationChangedHash.keys(), + [](const ModelNode &node) { + return node.isValid(); + }); for (const ModelNode &node : informationChangedNodes) { const QmlItemNode qmlItemNode(node);