From 795e5b7c7521d275750590be728ed1078150f537 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 21 Jul 2021 15:05:08 +0200 Subject: 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 --- sources/shiboken6/ApiExtractor/abstractmetafunction.cpp | 16 ++++++++++++++++ sources/shiboken6/ApiExtractor/abstractmetafunction.h | 2 ++ 2 files changed, 18 insertions(+) (limited to 'sources/shiboken6/ApiExtractor') diff --git a/sources/shiboken6/ApiExtractor/abstractmetafunction.cpp b/sources/shiboken6/ApiExtractor/abstractmetafunction.cpp index ffc31ca22..2199d7fe2 100644 --- a/sources/shiboken6/ApiExtractor/abstractmetafunction.cpp +++ b/sources/shiboken6/ApiExtractor/abstractmetafunction.cpp @@ -419,6 +419,22 @@ bool AbstractMetaFunction::usesRValueReferences() const return false; } +bool AbstractMetaFunction::generateBinding() const +{ + switch (d->m_functionType) { + case ConversionOperator: + case AssignmentOperatorFunction: + case MoveAssignmentOperatorFunction: + return false; + default: + break; + } + if (isPrivate() && d->m_functionType != EmptyFunction) + return false; + return d->m_name != u"qt_metacall" && !usesRValueReferences() + && !isModifiedRemoved(); +} + QStringList AbstractMetaFunction::introspectionCompatibleSignatures(const QStringList &resolvedArguments) const { AbstractMetaArgumentList arguments = this->arguments(); diff --git a/sources/shiboken6/ApiExtractor/abstractmetafunction.h b/sources/shiboken6/ApiExtractor/abstractmetafunction.h index 7917e7559..20e2e6d90 100644 --- a/sources/shiboken6/ApiExtractor/abstractmetafunction.h +++ b/sources/shiboken6/ApiExtractor/abstractmetafunction.h @@ -280,6 +280,8 @@ public: void setFunctionType(FunctionType type); bool usesRValueReferences() const; + bool generateBinding() const; + QStringList introspectionCompatibleSignatures(const QStringList &resolvedArguments = QStringList()) const; QString signature() const; -- cgit v1.2.3