From 5e4a1287c1742f96c5ba3ce0aca75791ce806157 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 3 Sep 2021 10:50:56 +0200 Subject: shiboken6: Handle hidden methods/"using" correctly In C++, declaring a non-override method in a class hides all methods of the same name from the base class unless they are made visible by a "using Base::name" specification. Shiboken did not observe this rule; base class methods were added nevertheless, causing problems with code snippets. In addition, there were several places where the recursion for the inherited base class methods was done. Move the collection of inherited base class methods into ShibokenGenerator::getFunctionGroups() and implement proper handling of using declarations. This function then returns the authoritative list of functions to be generated. Remove a few cases from the test. [ChangeLog][shiboken6] The handling of hidden base class member functions and using declarations has been fixed. Fixes: PYSIDE-1653 Change-Id: I62c9ec47617f94098c4a27a557a23bbfeaad805c Reviewed-by: Cristian Maureira-Fredes --- sources/shiboken6/ApiExtractor/abstractmetalang.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sources/shiboken6/ApiExtractor/abstractmetalang.h') diff --git a/sources/shiboken6/ApiExtractor/abstractmetalang.h b/sources/shiboken6/ApiExtractor/abstractmetalang.h index 39d5a4a8e..f08ed2039 100644 --- a/sources/shiboken6/ApiExtractor/abstractmetalang.h +++ b/sources/shiboken6/ApiExtractor/abstractmetalang.h @@ -146,6 +146,7 @@ public: void addUsingMember(const UsingMember &um); bool isUsingMember(const AbstractMetaClass *c, const QString &memberName, Access minimumAccess) const; + bool hasUsingMemberFor(const QString &memberName) const; AbstractMetaFunctionCList queryFunctionsByName(const QString &name) const; static bool queryFunction(const AbstractMetaFunction *f, FunctionQueryOptions query); -- cgit v1.2.3