diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2021-08-02 12:46:28 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2021-08-25 18:31:29 +0200 |
commit | c9ad328555abeb91cd843a79e2b3f6c6f5ed1f69 (patch) | |
tree | dfb3232f6c29bef7882dc06804f8d2e0f9cfd021 /src/qml/compiler/qqmlirbuilder.cpp | |
parent | c081316a4221da743f1dd122bd1de230a3a7abf7 (diff) |
QmlIR::Object: Get rid of isInlineComponent member
The necessary information is already available in the flags member.
Moreover, isInlineComponent and IsComponent (used for Component
properties) are mutually exclusive, so no need to check for inline
component flags if IsComponent is set.
Change-Id: Ibf171d63463f1e386a4063725b657aa998afd63f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/compiler/qqmlirbuilder.cpp')
-rw-r--r-- | src/qml/compiler/qqmlirbuilder.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp index 29cb8e33d7..e6efec0b16 100644 --- a/src/qml/compiler/qqmlirbuilder.cpp +++ b/src/qml/compiler/qqmlirbuilder.cpp @@ -600,7 +600,6 @@ bool IRBuilder::visit(QQmlJS::AST::UiInlineComponent *ast) Object* definedObject = _objects.at(idx); definedObject->flags |= QV4::CompiledData::Object::IsInlineComponentRoot; definedObject->flags |= QV4::CompiledData::Object::InPartOfInlineComponent; - definedObject->isInlineComponent = true; auto inlineComponent = New<InlineComponent>(); inlineComponent->nameIndex = registerString(ast->name.toString()); inlineComponent->objectIndex = idx; @@ -2007,7 +2006,7 @@ bool JSCodeGen::generateCodeForComponents(const QVector<quint32> &componentRoots bool JSCodeGen::compileComponent(int contextObject) { const QmlIR::Object *obj = document->objects.at(contextObject); - if (obj->flags & QV4::CompiledData::Object::IsComponent && !obj->isInlineComponent) { + if (obj->flags & QV4::CompiledData::Object::IsComponent) { Q_ASSERT(obj->bindingCount() == 1); const QV4::CompiledData::Binding *componentBinding = obj->firstBinding(); Q_ASSERT(componentBinding->type == QV4::CompiledData::Binding::Type_Object); @@ -2020,7 +2019,7 @@ bool JSCodeGen::compileComponent(int contextObject) bool JSCodeGen::compileJavaScriptCodeInObjectsRecursively(int objectIndex, int scopeObjectIndex) { QmlIR::Object *object = document->objects.at(objectIndex); - if (object->flags & QV4::CompiledData::Object::IsComponent && !object->isInlineComponent) + if (object->flags & QV4::CompiledData::Object::IsComponent) return true; for (auto it = object->inlineComponentsBegin(); it != object->inlineComponentsEnd(); ++it) |