diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-01-17 13:15:15 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-01-18 16:33:25 +0100 |
commit | ef2223f3d712e5f66c4654f7bce2011869ef958a (patch) | |
tree | 4e1c7bdfebb81d6afa4b7380fe9c2d32ac0141f1 /sources/shiboken6/ApiExtractor/abstractmetalang.h | |
parent | c1e64f5e5583ba6e9e36bf54327747018a2541bc (diff) |
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 <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/abstractmetalang.h')
-rw-r--r-- | sources/shiboken6/ApiExtractor/abstractmetalang.h | 3 |
1 files changed, 2 insertions, 1 deletions
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); |