diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-04-09 14:41:40 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-04-13 12:08:16 +0000 |
commit | af1bdd8447771728321984f87447187f0284db6b (patch) | |
tree | fd51376cba46d0a80cbc124c2db9d8e1f2ac1ff4 /sources/shiboken6/ApiExtractor/abstractmetalang.h | |
parent | 35285e0c88c0652e602a91e03c4a2bf6b493d7c6 (diff) |
shiboken6: Prevent crashes when registering static fields
Registering static fields invokes converters, which
can cause crashes for uninitialized types (see also
2ac1870053370e017567ae53e62cd1155a01c88f). To solve
this problem, move the static field initialization
to the end of the module initialization function
to ensure all converters are available.
Pick-to: 5.15 6.0
Fixes: PYSIDE-1529
Change-Id: If40c6faf049077db8afcdee2069f4441c21beaa4
Reviewed-by: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/abstractmetalang.h')
-rw-r--r-- | sources/shiboken6/ApiExtractor/abstractmetalang.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sources/shiboken6/ApiExtractor/abstractmetalang.h b/sources/shiboken6/ApiExtractor/abstractmetalang.h index eab7969a6..f83062dd7 100644 --- a/sources/shiboken6/ApiExtractor/abstractmetalang.h +++ b/sources/shiboken6/ApiExtractor/abstractmetalang.h @@ -174,6 +174,7 @@ public: AbstractMetaFieldList &fields(); void setFields(const AbstractMetaFieldList &fields); void addField(const AbstractMetaField &field); + bool hasStaticFields() const; std::optional<AbstractMetaField> findField(const QString &name) const; |