diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-09-03 10:50:56 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-09-06 11:28:41 +0200 |
commit | 5e4a1287c1742f96c5ba3ce0aca75791ce806157 (patch) | |
tree | 750e6283f3af3792d6aab6a586691029d8d9998c /sources/shiboken6/ApiExtractor/abstractmetalang.h | |
parent | cc7da649aff335ad86c669e3ccb0185738e9d9ae (diff) |
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 <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/abstractmetalang.h')
-rw-r--r-- | sources/shiboken6/ApiExtractor/abstractmetalang.h | 1 |
1 files changed, 1 insertions, 0 deletions
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); |