diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-03-22 08:23:57 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-03-29 00:06:14 +0200 |
| commit | 5c6382ee849c769e39d3a017966cfd4deb7dc15e (patch) | |
| tree | 2044a681ecb44bfad3dd1280b87c315061a2ac1e /sources/shiboken6/ApiExtractor/messages.cpp | |
| parent | 370e5c712cafb1ff3ca22cc1f9794904f6d7a14a (diff) | |
shiboken6: Synthesize missing smart pointer functions and classes
Add a function to create the smart pointer classes and their relevant
member functions in case they are not in the code model due to being
in some unspecified helper base class.
[ChangeLog][shiboken6] Using std::shared_ptr has been simplified; it
no longer requires specifying all implementation headers for the class
declaration to be fully visible.
Task-number: PYSIDE-454
Change-Id: I870ec59e55e947fa13f875c4af8756246651c466
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/messages.cpp')
| -rw-r--r-- | sources/shiboken6/ApiExtractor/messages.cpp | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/sources/shiboken6/ApiExtractor/messages.cpp b/sources/shiboken6/ApiExtractor/messages.cpp index 235f03ab9..c074df785 100644 --- a/sources/shiboken6/ApiExtractor/messages.cpp +++ b/sources/shiboken6/ApiExtractor/messages.cpp @@ -671,20 +671,6 @@ QString msgConversionTypesDiffer(const QString &varType, const QString &conversi return result; } -QString msgCannotFindSmartPointer(const QString &instantiationType, - const AbstractMetaClassCList &pointers) -{ - QString result; - QTextStream str(&result); - str << "Unable to find smart pointer type for " << instantiationType << " (known types:"; - for (auto t : pointers) { - auto typeEntry = t->typeEntry(); - str << ' ' << typeEntry->targetLangName() << '/' << typeEntry->qualifiedCppName(); - } - str << ")."; - return result; -} - QString msgCannotFindSmartPointerGetter(const SmartPointerTypeEntry *te) { return u"Getter \""_qs + te->getter() + u"()\" of smart pointer \""_qs @@ -759,6 +745,15 @@ QString msgClassNotFound(const TypeEntry *t) + QLatin1String("\" in the code model. Maybe it is forward declared?"); } +QString msgEnclosingClassNotFound(const TypeEntry *t) +{ + QString result; + QTextStream str(&result); + str << "Warning: Enclosing class \"" << t->parent()->name() + << "\" of class \"" << t->name() << "\" not found."; + return result; +} + QString msgUnknownOperator(const AbstractMetaFunction* func) { QString result = QLatin1String("Unknown operator: \"") + func->originalName() |
