summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-04-11 14:13:00 +0200
committerUlf Hermann <ulf.hermann@qt.io>2022-04-11 19:37:20 +0200
commitcfefda0e0047f0f76a3549e2d12accda54c9747d (patch)
tree8d2f983e74ce258ddfdb56fd2a7714f6da7b1617 /src
parentb9dcf12a463026d09b6bfa4ed213f62a480fb5f2 (diff)
downloadqtdeclarative-cfefda0e0047f0f76a3549e2d12accda54c9747d.tar.gz
Fix typo and apply some cosmetics
Change-Id: If51b86e1741b7e9f0e7e4d5f593496bd28cec081 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qml/common/qv4compileddata_p.h2
-rw-r--r--src/qml/compiler/qqmlirbuilder.cpp4
-rw-r--r--src/qml/inlinecomponentutils_p.h2
-rw-r--r--src/qml/jsruntime/qv4executablecompilationunit.cpp4
-rw-r--r--src/qml/qml/qqmltypecompiler.cpp14
5 files changed, 13 insertions, 13 deletions
diff --git a/src/qml/common/qv4compileddata_p.h b/src/qml/common/qv4compileddata_p.h
index 2ed7c24efe..7a862280f3 100644
--- a/src/qml/common/qv4compileddata_p.h
+++ b/src/qml/common/qv4compileddata_p.h
@@ -747,7 +747,7 @@ struct Object
HasDeferredBindings = 0x2, // any of the bindings are deferred
HasCustomParserBindings = 0x4,
IsInlineComponentRoot = 0x8,
- InPartOfInlineComponent = 0x10
+ IsPartOfInlineComponent = 0x10
};
// Depending on the use, this may be the type name to instantiate before instantiating this
diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp
index a4cb3f2535..6eb8584f38 100644
--- a/src/qml/compiler/qqmlirbuilder.cpp
+++ b/src/qml/compiler/qqmlirbuilder.cpp
@@ -586,7 +586,7 @@ bool IRBuilder::visit(QQmlJS::AST::UiInlineComponent *ast)
Q_ASSERT(idx > 0);
Object* definedObject = _objects.at(idx);
definedObject->flags |= QV4::CompiledData::Object::IsInlineComponentRoot;
- definedObject->flags |= QV4::CompiledData::Object::InPartOfInlineComponent;
+ definedObject->flags |= QV4::CompiledData::Object::IsPartOfInlineComponent;
auto inlineComponent = New<InlineComponent>();
inlineComponent->nameIndex = registerString(ast->name.toString());
inlineComponent->objectIndex = idx;
@@ -705,7 +705,7 @@ bool IRBuilder::defineQMLObject(
_object->init(pool, registerString(asString(qualifiedTypeNameId)), emptyStringIndex, location);
_object->declarationsOverride = declarationsOverride;
if (insideInlineComponent) {
- _object->flags |= QV4::CompiledData::Object::InPartOfInlineComponent;
+ _object->flags |= QV4::CompiledData::Object::IsPartOfInlineComponent;
}
// A new object is also a boundary for property declarations.
diff --git a/src/qml/inlinecomponentutils_p.h b/src/qml/inlinecomponentutils_p.h
index 74805d6d7c..109aef7cb8 100644
--- a/src/qml/inlinecomponentutils_p.h
+++ b/src/qml/inlinecomponentutils_p.h
@@ -112,7 +112,7 @@ void fillAdjacencyListForInlineComponents(ObjectContainer *objectContainer, Adja
while (int(referencedInICObjectIndex) < objectContainer->objectCount()) {
auto potentiallyReferencedInICObject = objectContainer->objectAt(referencedInICObjectIndex);
bool stillInIC = !(potentiallyReferencedInICObject-> flags & QV4::CompiledData::Object::IsInlineComponentRoot)
- && (potentiallyReferencedInICObject-> flags & QV4::CompiledData::Object::InPartOfInlineComponent);
+ && (potentiallyReferencedInICObject-> flags & QV4::CompiledData::Object::IsPartOfInlineComponent);
if (!stillInIC)
break;
createEdgeFromTypeRef(objectContainer->resolvedType(potentiallyReferencedInICObject->inheritedTypeNameIndex));
diff --git a/src/qml/jsruntime/qv4executablecompilationunit.cpp b/src/qml/jsruntime/qv4executablecompilationunit.cpp
index 1abb24c34e..05c5e5c5c6 100644
--- a/src/qml/jsruntime/qv4executablecompilationunit.cpp
+++ b/src/qml/jsruntime/qv4executablecompilationunit.cpp
@@ -446,7 +446,7 @@ void ExecutableCompilationUnit::finalizeCompositeType(QQmlEnginePrivate *qmlEngi
const QV4::CompiledData::Object *obj = objectAt(i);
bool leftCurrentInlineComponent =
(i != lastICRoot && obj->flags & QV4::CompiledData::Object::IsInlineComponentRoot)
- || !(obj->flags & QV4::CompiledData::Object::InPartOfInlineComponent);
+ || !(obj->flags & QV4::CompiledData::Object::IsPartOfInlineComponent);
if (leftCurrentInlineComponent)
break;
inlineComponentData[lastICRoot].totalBindingCount += obj->nBindings;
@@ -476,7 +476,7 @@ void ExecutableCompilationUnit::finalizeCompositeType(QQmlEnginePrivate *qmlEngi
int objectCount = 0;
for (quint32 i = 0, count = this->objectCount(); i < count; ++i) {
const QV4::CompiledData::Object *obj = objectAt(i);
- if (obj->flags & QV4::CompiledData::Object::InPartOfInlineComponent) {
+ if (obj->flags & QV4::CompiledData::Object::IsPartOfInlineComponent) {
continue;
}
bindingCount += obj->nBindings;
diff --git a/src/qml/qml/qqmltypecompiler.cpp b/src/qml/qml/qqmltypecompiler.cpp
index c8f2f118a2..f18a5dd1ae 100644
--- a/src/qml/qml/qqmltypecompiler.cpp
+++ b/src/qml/qml/qqmltypecompiler.cpp
@@ -883,16 +883,16 @@ bool QQmlComponentAndAliasResolver::resolve(int root)
const int startObjectIndex = root == 0 ? root : root+1; // root+1, as ic root is handled at the end
for (int i = startObjectIndex; i < objCountWithoutSynthesizedComponents; ++i) {
QmlIR::Object *obj = qmlObjects->at(i);
+ const bool isInlineComponentRoot
+ = obj->flags & QV4::CompiledData::Object::IsInlineComponentRoot;
+ const bool isPartOfInlineComponent
+ = obj->flags & QV4::CompiledData::Object::IsPartOfInlineComponent;
if (root == 0) {
// normal component root, skip over anything inline component related
- if (obj->flags & QV4::CompiledData::Object::IsInlineComponentRoot ||
- obj->flags & QV4::CompiledData::Object::InPartOfInlineComponent) {
+ if (isInlineComponentRoot || isPartOfInlineComponent)
continue;
- }
- } else {
- if (!(obj->flags & QV4::CompiledData::Object::InPartOfInlineComponent) ||
- obj->flags & QV4::CompiledData::Object::IsInlineComponentRoot)
- break; // left current inline component (potentially entered a new one)
+ } else if (!isPartOfInlineComponent || isInlineComponentRoot) {
+ break; // left current inline component (potentially entered a new one)
}
QQmlPropertyCache::ConstPtr cache = propertyCaches.at(i);
if (obj->inheritedTypeNameIndex == 0 && !cache)