QmlDesigner: Optimize isList method by using QStringView for expression

- Changed the expression variable type from QString to QStringView for
better performance.

Change-Id: I8cf8688615c126f281089f2c2b124b045765db8b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Marco Bubke
2025-04-27 09:30:38 +02:00
parent 018d15a46c
commit b7e28ce508

View File

@@ -151,7 +151,9 @@ bool BindingProperty::isList() const
if (!isValid())
return false;
return expression().startsWith('[') && expression().endsWith(']');
QStringView expression = this->expression();
return expression.startsWith('[') && expression.endsWith(']');
}
QList<ModelNode> BindingProperty::resolveListToModelNodes() const