aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2018-01-11 09:52:05 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2018-01-15 19:21:53 +0000
commit45a1fab55d3330bc8b581e68023e4cea8fd5065c (patch)
treefa4cba1e43ca0c67fb5dc1080280c9191f9ece9b /src
parent88d75f72d3ac32ceac806831741a64e5d425d4a5 (diff)
Correct the name of the base item variable in code dealing with inheritance
We now call the base item baseItem instead of inheritorItem. An "inheritor item" would be the item inheriting from the base item. Change-Id: I10b9246764bb11ec25ddc06d9e0d2d9a3bf2eb0b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/lib/corelib/language/itemreaderastvisitor.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/lib/corelib/language/itemreaderastvisitor.cpp b/src/lib/corelib/language/itemreaderastvisitor.cpp
index 8560d1afd..86274b1c2 100644
--- a/src/lib/corelib/language/itemreaderastvisitor.cpp
+++ b/src/lib/corelib/language/itemreaderastvisitor.cpp
@@ -85,7 +85,7 @@ bool ItemReaderASTVisitor::visit(AST::UiObjectDefinition *ast)
{
const QString typeName = ast->qualifiedTypeNameId->name.toString();
const CodeLocation itemLocation = toCodeLocation(ast->qualifiedTypeNameId->identifierToken);
- const Item *inheritorItem = nullptr;
+ const Item *baseItem = nullptr;
// Inheritance resolving, part 1: Find out our actual type name (needed for setting
// up children and alternatives).
@@ -93,10 +93,9 @@ bool ItemReaderASTVisitor::visit(AST::UiObjectDefinition *ast)
const QString baseTypeFileName = m_typeNameToFile.value(fullTypeName);
ItemType itemType;
if (!baseTypeFileName.isEmpty()) {
- inheritorItem = m_visitorState.readFile(baseTypeFileName, m_file->searchPaths(),
- m_itemPool);
- QBS_CHECK(inheritorItem->type() <= ItemType::LastActualItem);
- itemType = inheritorItem->type();
+ baseItem = m_visitorState.readFile(baseTypeFileName, m_file->searchPaths(), m_itemPool);
+ QBS_CHECK(baseItem->type() <= ItemType::LastActualItem);
+ itemType = baseItem->type();
} else {
if (fullTypeName.size() > 1) {
throw ErrorInfo(Tr::tr("Invalid item '%1'. Did you mean to set a module property?")
@@ -126,13 +125,13 @@ bool ItemReaderASTVisitor::visit(AST::UiObjectDefinition *ast)
ASTPropertiesItemHandler(item).handlePropertiesItems();
// Inheritance resolving, part 2 (depends on alternatives having been set up).
- if (inheritorItem) {
- inheritItem(item, inheritorItem);
- if (inheritorItem->file()->idScope()) {
+ if (baseItem) {
+ inheritItem(item, baseItem);
+ if (baseItem->file()->idScope()) {
// Make ids from the derived file visible in the base file.
// ### Do we want to turn off this feature? It's QMLish but kind of strange.
item->file()->ensureIdScope(m_itemPool);
- inheritorItem->file()->idScope()->setPrototype(item->file()->idScope());
+ baseItem->file()->idScope()->setPrototype(item->file()->idScope());
}
} else {
// Only the item at the top of the inheritance chain is a built-in item.