diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-05-09 14:14:35 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-05-11 13:06:27 +0000 |
commit | 32a097c74d8318f2f14e2caab752e9d9b691df25 (patch) | |
tree | 164a18d1bd1771477cc1d5e19adaaa3171ef4bae | |
parent | 8165b480353990fe31a7fe10332bde7d173cedf7 (diff) |
shiboken6: Log rejected operators
Add a new section to the rejected functions section
for operator where no base class can be found.
Change-Id: Id8af7a1c73e49854d33f85d95c26710d4c8f026c
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
(cherry picked from commit bea861c159ad4c8f248c7132b6c4f171223b31fa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp | 8 | ||||
-rw-r--r-- | sources/shiboken6/ApiExtractor/abstractmetabuilder.h | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp b/sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp index 65c504bc7..76c868698 100644 --- a/sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp +++ b/sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp @@ -290,8 +290,11 @@ void AbstractMetaBuilderPrivate::traverseOperatorFunction(const FunctionModelIte firstArgumentIsSelf = false; } } - if (!baseoperandClass) + if (!baseoperandClass) { + rejectFunction(item, currentClass, AbstractMetaBuilder::UnmatchedOperator, + u"base operand class not found."_s); return; + } if (item->isSpaceshipOperator() && !item->isDeleted()) { AbstractMetaClass::addSynthesizedComparisonOperators(baseoperandClass); @@ -3433,7 +3436,8 @@ static void writeRejectLogFile(const QString &name, {AbstractMetaBuilder::RedefinedToNotClass, "Type redefined to not be a class"_qba}, {AbstractMetaBuilder::UnmatchedReturnType, "Unmatched return type"_qba}, {AbstractMetaBuilder::UnmatchedArgumentType, "Unmatched argument type"_qba}, - {AbstractMetaBuilder::Deprecated, "Deprecated"_qba}, + {AbstractMetaBuilder::UnmatchedOperator, "Unmatched operator"_qba}, + {AbstractMetaBuilder::Deprecated, "Deprecated"_qba} }; QFile f(name); diff --git a/sources/shiboken6/ApiExtractor/abstractmetabuilder.h b/sources/shiboken6/ApiExtractor/abstractmetabuilder.h index 5078737d5..c25167ffb 100644 --- a/sources/shiboken6/ApiExtractor/abstractmetabuilder.h +++ b/sources/shiboken6/ApiExtractor/abstractmetabuilder.h @@ -35,6 +35,7 @@ public: RedefinedToNotClass, UnmatchedArgumentType, UnmatchedReturnType, + UnmatchedOperator, Deprecated, NoReason }; |