diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-09-29 13:16:55 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-09-30 13:09:42 +0200 |
commit | 46b43389c3f941415598db01cb8b19cc2450b424 (patch) | |
tree | 03da12f3b0b5d33cf66dac1790502f8687ee7c9f /sources/shiboken2/ApiExtractor | |
parent | 1e4c98eb237d174ed01ed3df2a0f2467fb5f09e0 (diff) |
shiboken2: Generate functions from invisible namespaces into their parent namespaces
Add them in ShibokenGenerator::getFunctionGroupsImpl() with some
helpers.
Fixes: PYSIDE-1075
Change-Id: Ie627c6e12f82e40cdb4f306ddac6b682e77124c5
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/ApiExtractor')
-rw-r--r-- | sources/shiboken2/ApiExtractor/abstractmetalang.cpp | 9 | ||||
-rw-r--r-- | sources/shiboken2/ApiExtractor/abstractmetalang.h | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/sources/shiboken2/ApiExtractor/abstractmetalang.cpp b/sources/shiboken2/ApiExtractor/abstractmetalang.cpp index 38fb5f152..80ec20b46 100644 --- a/sources/shiboken2/ApiExtractor/abstractmetalang.cpp +++ b/sources/shiboken2/ApiExtractor/abstractmetalang.cpp @@ -2159,6 +2159,15 @@ void AbstractMetaClass::getEnumsFromInvisibleNamespacesToBeGenerated(AbstractMet } } +void AbstractMetaClass::getFunctionsFromInvisibleNamespacesToBeGenerated(AbstractMetaFunctionList *funcList) const +{ + if (isNamespace()) { + invisibleNamespaceRecursion([funcList](AbstractMetaClass *c) { + funcList->append(c->functions()); + }); + } +} + static void addExtraIncludeForType(AbstractMetaClass *metaClass, const AbstractMetaType *type) { if (!type) diff --git a/sources/shiboken2/ApiExtractor/abstractmetalang.h b/sources/shiboken2/ApiExtractor/abstractmetalang.h index 91a6138d1..dcc3e58d6 100644 --- a/sources/shiboken2/ApiExtractor/abstractmetalang.h +++ b/sources/shiboken2/ApiExtractor/abstractmetalang.h @@ -1432,6 +1432,8 @@ public: void getEnumsToBeGenerated(AbstractMetaEnumList *enumList) const; void getEnumsFromInvisibleNamespacesToBeGenerated(AbstractMetaEnumList *enumList) const; + void getFunctionsFromInvisibleNamespacesToBeGenerated(AbstractMetaFunctionList *funcList) const; + QString fullName() const { return package() + QLatin1Char('.') + name(); |