aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qqmlirbuilder.cpp
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2023-01-05 15:57:52 +0100
committerFabian Kosmale <fabian.kosmale@qt.io>2023-01-17 21:58:31 +0100
commit6b8743f3b692beefececadb204f65feb25e3237f (patch)
tree176e62c5c08c76d280645e2813effa76c0424387 /src/qml/compiler/qqmlirbuilder.cpp
parent054d62c2e077f2490d1cc89e78857d7860091b80 (diff)
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 <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/compiler/qqmlirbuilder.cpp')
-rw-r--r--src/qml/compiler/qqmlirbuilder.cpp6
1 files changed, 3 insertions, 3 deletions
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<QV4::CompiledData::Import>();
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>();
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()) {