From ef2223f3d712e5f66c4654f7bce2011869ef958a Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 17 Jan 2022 13:15:15 +0100 Subject: shiboken6: Fix handling of value types with protected constructors Value types with some protected constructors (like QOperatingSystemVersionBase in 6.3) caused compile errors on Windows where the protected hack is disabled since non-accessible constructors were used. The check for isValueTypeWithCopyConstructorOnly() needs to be fixed to exclude protected constructors in case AvoidProtectedHack is set. Similarly, the visibility of the minimal default constructor needs to be checked. Add the AvoidProtectedHack setting to ApiExtractorResult for this purpose since it influences the API in a way. Pick-to: 6.2 Change-Id: Ifeab320b9391aa21c5b1de4d21d2d8276fe44d3f Reviewed-by: Christian Tismer --- sources/shiboken6/ApiExtractor/abstractmetalang.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sources/shiboken6/ApiExtractor/abstractmetalang.h') diff --git a/sources/shiboken6/ApiExtractor/abstractmetalang.h b/sources/shiboken6/ApiExtractor/abstractmetalang.h index 555b7158f..df978f598 100644 --- a/sources/shiboken6/ApiExtractor/abstractmetalang.h +++ b/sources/shiboken6/ApiExtractor/abstractmetalang.h @@ -349,7 +349,8 @@ public: bool isCopyable() const; bool isValueTypeWithCopyConstructorOnly() const; void setValueTypeWithCopyConstructorOnly(bool v); - static bool determineValueTypeWithCopyConstructorOnly(const AbstractMetaClass *c); + static bool determineValueTypeWithCopyConstructorOnly(const AbstractMetaClass *c, + bool avoidProtectedHack); static AbstractMetaClass *findClass(const AbstractMetaClassList &classes, const QString &name); -- cgit v1.2.3