aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/generator/shiboken/cppgenerator.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-07-21 15:05:08 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-07-21 15:58:36 +0200
commit795e5b7c7521d275750590be728ed1078150f537 (patch)
tree1c21e383424909bf146f266432bac381eda1cb8e /sources/shiboken6/generator/shiboken/cppgenerator.cpp
parentf7db16f3e9e7a567a3f8993507b701b20addb627 (diff)
shiboken6: Skip base functions for which no bindings should be generated
Factor out a function for checking the bindings generation and use that in getInheritedOverloads() as well. Amends b1b2cc2ebed2fcf6e31c1fbbdd3638216e34717b, which caused some modified-removed functions to be generated in derived classes. Pick-to: 6.1 Change-Id: Iddb2f868c360da5397279cc3058cb554f5e51b42 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6/generator/shiboken/cppgenerator.cpp')
-rw-r--r--sources/shiboken6/generator/shiboken/cppgenerator.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/sources/shiboken6/generator/shiboken/cppgenerator.cpp b/sources/shiboken6/generator/shiboken/cppgenerator.cpp
index ac866dd28..51c6d051d 100644
--- a/sources/shiboken6/generator/shiboken/cppgenerator.cpp
+++ b/sources/shiboken6/generator/shiboken/cppgenerator.cpp
@@ -538,13 +538,8 @@ void CppGenerator::generateClass(TextStream &s, const GeneratorContext &classCon
QSet<QString> seenSignatures;
bool staticEncountered = false;
for (const auto &func : it.value()) {
- if (!func->isAssignmentOperator()
- && !func->usesRValueReferences()
- && !func->isConversionOperator()
- && !func->isModifiedRemoved()
- && (!func->isPrivate() || func->functionType() == AbstractMetaFunction::EmptyFunction)
- && func->ownerClass() == func->implementingClass()
- && (func->name() != QLatin1String("qt_metacall"))) {
+ if (func->ownerClass() == func->implementingClass()
+ && func->generateBinding()) {
// PYSIDE-331: Inheritance works correctly when there are disjoint functions.
// But when a function is both in a class and inherited in a subclass,
// then we need to search through all subclasses and collect the new signatures.