forked from qt-creator/qt-creator
QmlDesigner: Use QStringView to avoid some allocations
std::ranges would be even more optimal but we can do that later. Change-Id: I81a949bc1f9149e8a33bed88dc5ff9a9949bdc20 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -29,7 +29,7 @@ public:
|
||||
: m_enumerationName{text, static_cast<qsizetype>(std::strlen(text))}
|
||||
{}
|
||||
|
||||
Enumeration(const QString &enumerationName)
|
||||
Enumeration(QStringView enumerationName)
|
||||
: m_enumerationName(enumerationName.toUtf8())
|
||||
{}
|
||||
|
||||
|
@@ -550,9 +550,9 @@ public:
|
||||
const NodeMetaInfo &metaInfo,
|
||||
const QString &propertyPrefix,
|
||||
AST::UiQualifiedId *propertyId,
|
||||
const QString &astValue)
|
||||
QStringView astValue)
|
||||
{
|
||||
QStringList astValueList = astValue.split(u'.');
|
||||
QList<QStringView> astValueList = astValue.split(u'.');
|
||||
|
||||
if (astValueList.size() == 2) {
|
||||
//Check for global Qt enums
|
||||
|
Reference in New Issue
Block a user