aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qqmljsstorageinitializer.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2024-11-26 15:46:12 +0100
committerUlf Hermann <ulf.hermann@qt.io>2024-12-03 15:15:22 +0100
commitecb7529df4f96827614073922d9e9d199bfdd44d (patch)
treec718eda81c706cce855819c111c864e1910ac844 /src/qmlcompiler/qqmljsstorageinitializer.cpp
parentd3f00fd1d91800e894303a5beeb9fd300df7fc8b (diff)
QmlCompiler: Store QQmlJSRegisterContent in place where we can
There is no need anymore to create a new QQmlJSRegisterContentPrivate just to add a storage type. Furthermore, we should record the generalization origin when generalizing storage. Task-number: QTBUG-124670 Change-Id: Ib1413e645fbc927806f85c7aa235c95a4cbfaa96 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Diffstat (limited to 'src/qmlcompiler/qqmljsstorageinitializer.cpp')
-rw-r--r--src/qmlcompiler/qqmljsstorageinitializer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qmlcompiler/qqmljsstorageinitializer.cpp b/src/qmlcompiler/qqmljsstorageinitializer.cpp
index 96a44c9eea..4123716fa4 100644
--- a/src/qmlcompiler/qqmljsstorageinitializer.cpp
+++ b/src/qmlcompiler/qqmljsstorageinitializer.cpp
@@ -23,7 +23,7 @@ QQmlJSCompilePass::BlocksAndAnnotations QQmlJSStorageInitializer::run(Function *
if (QQmlJSRegisterContent &returnType = function->returnType; returnType.isValid()) {
if (const QQmlJSScope::ConstPtr stored
= m_typeResolver->storedType(returnType.containedType())) {
- returnType = m_pool->storedIn(returnType, stored);
+ m_pool->storeType(returnType, stored);
} else {
addError(QStringLiteral("Cannot store the return type %1.")
.arg(returnType.containedType()->internalName()));
@@ -38,7 +38,7 @@ QQmlJSCompilePass::BlocksAndAnnotations QQmlJSStorageInitializer::run(Function *
const QQmlJSRegisterContent original = m_typeResolver->original(content);
const QQmlJSScope::ConstPtr originalStored
= m_typeResolver->storedType(original.containedType());
- content = m_pool->storedIn(content, originalStored);
+ m_pool->storeType(content, originalStored);
const QQmlJSScope::ConstPtr adjustedStored
= m_typeResolver->storedType(content.containedType());