From c7d0c7c5ce00a37461908dd9329aa563cd146b1e Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 4 Apr 2022 14:07:10 +0200 Subject: 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 Reviewed-by: Qt CI Bot --- sources/shiboken6/ApiExtractor/messages.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sources/shiboken6/ApiExtractor/messages.h') diff --git a/sources/shiboken6/ApiExtractor/messages.h b/sources/shiboken6/ApiExtractor/messages.h index cdce6788c..45ed3540c 100644 --- a/sources/shiboken6/ApiExtractor/messages.h +++ b/sources/shiboken6/ApiExtractor/messages.h @@ -207,7 +207,7 @@ QString msgConversionTypesDiffer(const QString &varType, const QString &conversi QString msgCannotFindSmartPointerGetter(const SmartPointerTypeEntry *); -QString msgCannotFindSmartPointerRefCount(const SmartPointerTypeEntry *); +QString msgCannotFindSmartPointerMethod(const SmartPointerTypeEntry *te, const QString &m); QString msgMethodNotFound(const AbstractMetaClass *klass, const QString &name); -- cgit v1.2.3