aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSami Shalayel <sami.shalayel@qt.io>2022-10-04 14:40:04 +0200
committerSami Shalayel <sami.shalayel@qt.io>2022-10-10 09:57:47 +0200
commitaaa69996c580968e017a7c922a1ee567909f272d (patch)
treee7d93f2de7760fd53d3dcf033bc6e73eb1976fed /tools
parentbe104adfb5748e801e03f9d1b5fcc91ab74c5c4d (diff)
qqmljsimportvisitor: rename m_currentInlineComponent to m_currentRoot
Small refactor to improve readability: rename qqmljsimportvisitor::m_currentInlineComponentName to m_currentRootName as it denotes the current inline component OR the document root. The previous naming implied wrongly that it was useless when outside an inline component. Change-Id: Ie3c9aa10182f0c9e50650cecaa3e3eb1e37e90eb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmltc/qmltcvisitor.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/qmltc/qmltcvisitor.cpp b/tools/qmltc/qmltcvisitor.cpp
index 71fe8d5dc9..c36290a360 100644
--- a/tools/qmltc/qmltcvisitor.cpp
+++ b/tools/qmltc/qmltcvisitor.cpp
@@ -198,15 +198,15 @@ bool QmltcVisitor::visit(QQmlJS::AST::UiObjectDefinition *object)
return true;
if (m_currentScope->isInlineComponent()) {
- m_inlineComponentNames.append(m_currentInlineComponentName);
- m_inlineComponents[m_currentInlineComponentName] = m_currentScope;
+ m_inlineComponentNames.append(m_currentRootName);
+ m_inlineComponents[m_currentRootName] = m_currentScope;
}
if (m_currentScope != m_exportedRootScope) // not document root
addCleanQmlTypeName(&m_qmlTypeNames, m_currentScope);
// give C++-relevant internal names to QMLScopes, we can use them later in compiler
m_currentScope->setInternalName(uniqueNameFromPieces(m_qmlTypeNames, m_qmlTypeNameCounts));
- m_qmlTypesWithQmlBases[m_currentInlineComponentName].append(m_currentScope);
+ m_qmlTypesWithQmlBases[m_currentRootName].append(m_currentScope);
return true;
}
@@ -228,7 +228,7 @@ bool QmltcVisitor::visit(QQmlJS::AST::UiObjectBinding *uiob)
// give C++-relevant internal names to QMLScopes, we can use them later in compiler
m_currentScope->setInternalName(uniqueNameFromPieces(m_qmlTypeNames, m_qmlTypeNameCounts));
- m_qmlTypesWithQmlBases[m_currentInlineComponentName].append(m_currentScope);
+ m_qmlTypesWithQmlBases[m_currentRootName].append(m_currentScope);
return true;
}