aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-10-28 12:37:46 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-12-03 19:49:07 +0100
commit0a438ec2fa02bbb0555615e518e7ea249510a5ae (patch)
tree6fb9261ef1d67ff6323762df6dd2a10b0b9590d6 /sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
parent290a7561c86bc37a7993668bb2b80d2a38dfb8a4 (diff)
shiboken: Clean up handling of enclosing class
Add a EnclosingClassMixin which provides targetLangEnclosingClass() by walking up the hierarchy and remove duplicated code. Task-number: PYSIDE-990 Task-number: PYSIDE-1074 Change-Id: Ia69b687a34e735f74265d72727e6bad3216c33f0 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/generator/shiboken2/shibokengenerator.cpp')
-rw-r--r--sources/shiboken2/generator/shiboken2/shibokengenerator.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
index fd75c620e..07c031d9b 100644
--- a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
@@ -337,22 +337,6 @@ void ShibokenGenerator::lookForEnumsInClassesNotToBeGenerated(AbstractMetaEnumLi
}
}
-static const AbstractMetaClass *getProperEnclosingClass(const AbstractMetaClass *metaClass)
-{
- if (!metaClass)
- return nullptr;
-
- if (metaClass->typeEntry()->codeGeneration() != TypeEntry::GenerateForSubclass)
- return metaClass;
-
- return getProperEnclosingClass(metaClass->enclosingClass());
-}
-
-const AbstractMetaClass *ShibokenGenerator::getProperEnclosingClassForEnum(const AbstractMetaEnum *metaEnum)
-{
- return getProperEnclosingClass(metaEnum->enclosingClass());
-}
-
QString ShibokenGenerator::wrapperName(const AbstractMetaClass *metaClass) const
{
if (shouldGenerateCppWrapper(metaClass)) {