diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-09-05 14:49:25 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-09-06 13:09:37 +0200 |
| commit | 21e1bfafa1ed86adfa2e9ec4e990a582e4a20266 (patch) | |
| tree | bf4e020ba25c6752c4e8674657898502cbf06e0c /sources/shiboken6/ApiExtractor/messages.cpp | |
| parent | 429961686dfce2b2a3a5fba868a2664f281fc824 (diff) | |
shiboken6: Refactor Handling of CustomConversion
CustomConversion can appear in PrimitiveTypeEntry, ContainerTypeEntry
and ValueTypeEntry. Move the field from the base class TypeEntry
there.
The deprecated QString targetConversionRule() was only implemented for
ValueTypeEntry; move it from the base class TypeEntry
there.
In the original code, CustomConversion was stored as a raw pointer in
TypeEntry. This is bad since TypeEntry are cloneable. Use a
QSharedPointer to prevent crashes.
Change-Id: Ia74219671bbd5792398f9711b4a020f5c9825b1b
Reviewed-by: Christian Tismer <tismer@stackless.com>
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 e91aef5cc..29fb23edb 100644 --- a/sources/shiboken6/ApiExtractor/messages.cpp +++ b/sources/shiboken6/ApiExtractor/messages.cpp @@ -931,3 +931,11 @@ QString msgArgumentClassNotFound(const AbstractMetaFunctionCPtr &func, << "\" for \"" << func->classQualifiedSignature() << "\" not found!"; return result; } + +QString msgMissingCustomConversion(const TypeEntry *t) +{ + QString result; + QTextStream(&result) << "Entry \"" << t->qualifiedCppName() + << "\" is missing a custom conversion."; + return result; +} |
