aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qqmljsstorageinitializer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmlcompiler/qqmljsstorageinitializer.cpp')
-rw-r--r--src/qmlcompiler/qqmljsstorageinitializer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qmlcompiler/qqmljsstorageinitializer.cpp b/src/qmlcompiler/qqmljsstorageinitializer.cpp
index a542e03e3f..04ba64a647 100644
--- a/src/qmlcompiler/qqmljsstorageinitializer.cpp
+++ b/src/qmlcompiler/qqmljsstorageinitializer.cpp
@@ -32,19 +32,19 @@ QQmlJSCompilePass::BlocksAndAnnotations QQmlJSStorageInitializer::run(Function *
}
const auto storeRegister = [&](QQmlJSRegisterContent &content) {
- if (!content.isValid())
+ if (!content.isValid() || !content.storage().isNull())
return;
- const QQmlJSScope::ConstPtr original
- = m_typeResolver->originalType(content.containedType());
- const QQmlJSScope::ConstPtr originalStored = m_typeResolver->storedType(original);
+ const QQmlJSRegisterContent original = m_typeResolver->original(content);
+ const QQmlJSScope::ConstPtr originalStored
+ = m_typeResolver->storedType(original.containedType());
const QQmlJSScope::ConstPtr originalTracked = m_typeResolver->trackedType(originalStored);
content = m_pool->storedIn(content, originalTracked);
const QQmlJSScope::ConstPtr adjustedStored
= m_typeResolver->storedType(content.containedType());
- if (!m_typeResolver->adjustTrackedType(originalTracked, adjustedStored)) {
+ if (!m_typeResolver->adjustTrackedType(content.storage(), adjustedStored)) {
addError(QStringLiteral("Cannot adjust stored type for %1.")
.arg(content.containedType()->internalName()));
}