diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2025-02-21 15:41:07 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2025-03-03 10:46:36 +0100 |
| commit | 934e4db8ea95843f1585c81b28613c97eca7e2ce (patch) | |
| tree | 3168199e229490336fff1e30319e60630cc54623 /sources/shiboken6/ApiExtractor/messages.cpp | |
| parent | 2c3c5c0db5f1dbaafd23befc07633382b86e890d (diff) | |
shiboken6: Add a way of removing redundant overloads that differ in one parameter
When retrieving the function groups, check if there overloads that
differ in one parameter and remove them based on rules specified in
the type system. For example, when QByteArray::number(qint64) and
QByteArray::number(int) exist, it does not make sense to generate an
overload for int with parameter checking.
[ChangeLog][shiboken6] It is now possible to specify rules
to remove redundant overloads that differ in one parameter.
Task-number: PYSIDE-2701
Change-Id: I8e1ccbccfe7b5ad76486dc197e8d9c36f1809fbe
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/messages.cpp')
| -rw-r--r-- | sources/shiboken6/ApiExtractor/messages.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sources/shiboken6/ApiExtractor/messages.cpp b/sources/shiboken6/ApiExtractor/messages.cpp index 87dc4bd47..29cf6d091 100644 --- a/sources/shiboken6/ApiExtractor/messages.cpp +++ b/sources/shiboken6/ApiExtractor/messages.cpp @@ -1061,3 +1061,11 @@ QString msgCannotCall(const AbstractMetaFunctionCPtr &func, str << " There is no conversion rule."; return result; } + +QString msgRemoveRedundantOverload(const AbstractMetaFunctionCPtr &func, + const QString &type) +{ + return "Removing \""_L1 + func->classQualifiedSignature() + + "\" due to presence of an overload taking a \""_L1 + + type + "\" parameter."_L1; +} |
