From 6b8743f3b692beefececadb204f65feb25e3237f Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Thu, 5 Jan 2023 15:57:52 +0100 Subject: QQmlIRBuilder: Clean up QStringView oddities The port from QStringRef to QStringView created a few odd constructs, like locals of type const QStringView & and explicitly creating a QStringView from a QString before passing it to a function taking a QSV. Clean them up. Change-Id: I92293198266530f8ab8b9c858a0f0a96e31d7680 Reviewed-by: Ulf Hermann --- src/qml/compiler/qqmlirbuilder.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/qml/compiler/qqmlirbuilder.cpp') diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp index c35e488d3d..b2d5f2c3d2 100644 --- a/src/qml/compiler/qqmlirbuilder.cpp +++ b/src/qml/compiler/qqmlirbuilder.cpp @@ -358,7 +358,7 @@ void ScriptDirectivesCollector::importModule(const QString &uri, const QString & QV4::CompiledData::Import *import = engine->pool()->New(); import->type = QV4::CompiledData::Import::ImportLibrary; import->uriIndex = jsGenerator->registerString(uri); - import->version = IRBuilder::extractVersion(QStringView(version)); + import->version = IRBuilder::extractVersion(version); import->qualifierIndex = jsGenerator->registerString(module); import->location.set(lineNumber, column); document->imports << import; @@ -1025,7 +1025,7 @@ bool IRBuilder::visit(QQmlJS::AST::UiPublicMember *node) if (memberType == QLatin1String("alias")) { return appendAlias(node); } else { - const QStringView &name = node->name; + QStringView name = node->name; Property *property = New(); property->setIsReadOnly(node->isReadonly()); @@ -1038,7 +1038,7 @@ bool IRBuilder::visit(QQmlJS::AST::UiPublicMember *node) else property->setCustomType(registerString(memberType)); - const QStringView &typeModifier = node->typeModifier; + QStringView typeModifier = node->typeModifier; if (typeModifier == QLatin1String("list")) { property->setIsList(true); } else if (!typeModifier.isEmpty()) { -- cgit v1.2.3