diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-04-04 14:07:10 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-04-05 14:45:06 +0200 |
| commit | c7d0c7c5ce00a37461908dd9329aa563cd146b1e (patch) | |
| tree | 739b86ef81a884121cd5a6a765db5f3412e62d2b /sources/shiboken6/ApiExtractor/messages.cpp | |
| parent | 5f836597140d2ae82f235d69561cc7f426e2d7af (diff) | |
shiboken6: Add attribute "value-check-method" to smart pointers
"value-check-method" (operator bool, std::optional::has_value()), is
the opposite of the existing "null-check-method"
(QSharedPointer::isNull()) and takes precedence over it. Synthesize
these methods for smart pointers as well.
As a drive-by, actually generate the value check and null check methods.
Add a test for std::shared_ptr.
Task-number: PYSIDE-454
Change-Id: Ie3b6f7042883888d23c9e6bed8a1409f0bdb56b9
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/messages.cpp')
| -rw-r--r-- | sources/shiboken6/ApiExtractor/messages.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sources/shiboken6/ApiExtractor/messages.cpp b/sources/shiboken6/ApiExtractor/messages.cpp index c074df785..8898a3cf9 100644 --- a/sources/shiboken6/ApiExtractor/messages.cpp +++ b/sources/shiboken6/ApiExtractor/messages.cpp @@ -677,10 +677,10 @@ QString msgCannotFindSmartPointerGetter(const SmartPointerTypeEntry *te) + te->name() + u"\" not found."_qs; } -QString msgCannotFindSmartPointerRefCount(const SmartPointerTypeEntry *te) +QString msgCannotFindSmartPointerMethod(const SmartPointerTypeEntry *te, const QString &m) { - return u"Ref count method \""_qs + te->refCountMethodName() - + u"()\" of smart pointer \""_qs + te->name() + u"\" not found."_qs; + return u"Method \""_qs + m + u"()\" of smart pointer \""_qs + + te->name() + u"\" not found."_qs; } QString msgMethodNotFound(const AbstractMetaClass *klass, const QString &name) |
