aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor
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/ApiExtractor
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/ApiExtractor')
-rw-r--r--sources/shiboken6/ApiExtractor/abstractmetafunction.cpp16
-rw-r--r--sources/shiboken6/ApiExtractor/abstractmetafunction.h2
2 files changed, 18 insertions, 0 deletions
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;