forked from qt-creator/qt-creator
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user