forked from qt-creator/qt-creator
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 <thomas.hartmann@qt.io>
This commit is contained in:
@@ -721,9 +721,10 @@ void FormEditorView::instanceInformationsChanged(const QMultiHash<ModelNode, Inf
|
|||||||
{
|
{
|
||||||
QList<FormEditorItem *> changedItems;
|
QList<FormEditorItem *> changedItems;
|
||||||
|
|
||||||
QList<ModelNode> informationChangedNodes = Utils::filtered(
|
QList<ModelNode> informationChangedNodes = Utils::filtered(informationChangedHash.keys(),
|
||||||
informationChangedHash.keys(),
|
[](const ModelNode &node) {
|
||||||
[](const ModelNode &node) { return QmlItemNode::isValidQmlItemNode(node); });
|
return node.isValid();
|
||||||
|
});
|
||||||
|
|
||||||
for (const ModelNode &node : informationChangedNodes) {
|
for (const ModelNode &node : informationChangedNodes) {
|
||||||
const QmlItemNode qmlItemNode(node);
|
const QmlItemNode qmlItemNode(node);
|
||||||
|
Reference in New Issue
Block a user