diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-05-31 15:50:27 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-06-01 13:57:52 +0200 |
commit | 01950f70670291c49449f062cc0c21b080eca705 (patch) | |
tree | 648373ca2c28d02fc30ca7cd9cc9b446f315d5bf | |
parent | 652b900df1676990b11fcfa379ef916091a79221 (diff) |
shiboken6: Do not generate overloads of comparison operators from base classes
Comparing a derived class against the base class should not be possible
(for example, QBluetoothUuid and QUuid).
Pick-to: 6.1
Change-Id: I546cdb6d00c9f0e7f045780b800418c1fc90acc7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
-rw-r--r-- | sources/shiboken6/ApiExtractor/abstractmetalang.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sources/shiboken6/ApiExtractor/abstractmetalang.cpp b/sources/shiboken6/ApiExtractor/abstractmetalang.cpp index 69f48ca91..20c4bb554 100644 --- a/sources/shiboken6/ApiExtractor/abstractmetalang.cpp +++ b/sources/shiboken6/ApiExtractor/abstractmetalang.cpp @@ -1402,6 +1402,11 @@ void AbstractMetaClass::fixFunctions() if (sf->isUserAdded() && sf->declaringClass() != this) continue; + // Skip base class comparison operators declared as members (free + // operators are added later by traverseOperatorFunction(). + if (sf->isComparisonOperator()) + continue; + // we generally don't care about private functions, but we have to get the ones that are // virtual in case they override abstract functions. bool add = addSuperFunction(sf); |