diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-10-27 09:56:41 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-10-28 16:02:19 +0200 |
| commit | 1e7f97e082d5430ff8323bc58c480d00a4f64852 (patch) | |
| tree | e0e84d6b73dd70f67846d379fc2d9ed5024a5215 /sources/shiboken6/ApiExtractor/messages.cpp | |
| parent | d7357265bed4ab1fff539957df0ec7dbe6b954b2 (diff) | |
shiboken6: Do not crash when class cannot be found in the overload sorter
Print an error message instead.
As a drive-by, add a helper to create a class-qualified signature
for error reporting purposes to AbstractMetaFunction.
Pick-to: 6.2 5.15
Task-number: PYSIDE-1684
Change-Id: I8417f405b4ce1b64060aad0696e5d328869cb83e
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/messages.cpp')
| -rw-r--r-- | sources/shiboken6/ApiExtractor/messages.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sources/shiboken6/ApiExtractor/messages.cpp b/sources/shiboken6/ApiExtractor/messages.cpp index 8079e5851..c530586e0 100644 --- a/sources/shiboken6/ApiExtractor/messages.cpp +++ b/sources/shiboken6/ApiExtractor/messages.cpp @@ -311,9 +311,8 @@ QString msgShadowingFunction(const AbstractMetaFunction *f1, auto f2Class = f2->implementingClass(); QString result; QTextStream str(&result); - str << f2Class->sourceLocation() << "Shadowing: " << f1->implementingClass()->name() - << "::" << f1->signature() << " and " << f2Class->name() << "::" - << f2->signature(); + str << f2Class->sourceLocation() << "Shadowing: " << f1->classQualifiedSignature() + << " and " << f2->classQualifiedSignature(); return result; } @@ -877,3 +876,12 @@ QString msgUnknownCheckFunction(const TypeEntry *t) return u"Unknown check function for type: '"_qs + t->qualifiedCppName() + u"'."_qs; } + +QString msgArgumentClassNotFound(const AbstractMetaFunctionCPtr &func, + const TypeEntry *t) +{ + QString result; + QTextStream(&result) << "Internal Error: Class \"" << t->qualifiedCppName() + << "\" for \"" << func->classQualifiedSignature() << "\" not found!"; + return result; +} |
