aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-05-06 15:25:00 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-05-06 20:29:55 +0000
commit83704e5a1126cffc2741e83dc500bbc35418ec2e (patch)
tree43ca7ca5c20321159274b06c69ec06b9fa0d564a
parenteb155b56c6029cc07b7f7ba067b8c1af588c33e4 (diff)
shiboken6: Exclude static fields from default constructible check6.2
Manifests for QAudioFormat in 6.4. Amends 5fcbb17760d9ddf0a1e39c40baeaf28df9a4bb5e. Change-Id: I54dd0c116764ec68d944c70159401adc2ee1d6e1 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit fc5f4eb973593ee5c26247e0502100c462b1fe7b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--sources/shiboken6/ApiExtractor/abstractmetalang.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/sources/shiboken6/ApiExtractor/abstractmetalang.cpp b/sources/shiboken6/ApiExtractor/abstractmetalang.cpp
index 022d05f94..f60e6f8e9 100644
--- a/sources/shiboken6/ApiExtractor/abstractmetalang.cpp
+++ b/sources/shiboken6/ApiExtractor/abstractmetalang.cpp
@@ -952,6 +952,8 @@ bool AbstractMetaClass::isDefaultConstructible() const
// (non-ref or not const value).
static bool defaultConstructibleField(const AbstractMetaField &f)
{
+ if (f.isStatic())
+ return true;
const auto &type = f.type();
return type.referenceType() == NoReference
&& !(type.indirections() == 0 && type.isConstant()); // no const values