aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-10-25 11:03:45 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-11-25 16:15:12 +0100
commit2914408d9017d192f254b4c7b2d298bb7b6e885e (patch)
tree143dce2ca33d660d4611b91cd06b9170d3a7ad3e /sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
parent0ced05f77b88c68c8e2a1c71161cb19b9c890f59 (diff)
shiboken: Refactor target lang name
- Devirtualize TypeEntry::targetLangName() and replace by QString buildTargetLangName() that walks up the hierarchy and builds the name from the components. It populates a mutable variable m_cachedTargetLangName. - Implement setTargetLangName() to set m_cachedTargetLangName directly so that it works in all classes (for target-lang-name). - Implement a targetLangEntryName() that returns the last name part using the same pattern. - Remove the unused lookupName(). Fixes: PYSIDE-1133 Task-number: PYSIDE-990 Task-number: PYSIDE-1074 Change-Id: I15a6805a21584f1d7d4222e577e50907d7291841 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp')
-rw-r--r--sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
index 32c8e437d..0ecf2dce4 100644
--- a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
+++ b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp
@@ -539,9 +539,6 @@ void AbstractMetaBuilderPrivate::traverseDom(const FileModelItem &dom)
cls->addDefaultCopyConstructor(ancestorHasPrivateCopyConstructor(cls));
}
}
-
- if (cls->isAbstract() && !cls->isInterface())
- cls->typeEntry()->setLookupName(cls->typeEntry()->targetLangName() + QLatin1String("$ConcreteWrapper"));
}
const auto &allEntries = types->entries();
@@ -584,7 +581,7 @@ void AbstractMetaBuilderPrivate::traverseDom(const FileModelItem &dom)
AbstractMetaClass *cls = AbstractMetaClass::findClass(m_metaClasses, name);
const bool enumFound = cls
- ? cls->findEnum(entry->targetLangName()) != nullptr
+ ? cls->findEnum(entry->targetLangEntryName()) != nullptr
: m_enums.contains(entry);
if (!enumFound) {