summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2023-09-11 13:42:25 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-09-22 08:43:49 +0000
commitc758be532150d33fe840a99325fe10df2e9efaf8 (patch)
tree5b5bb432025becc258833d9ceff54834439ad0c1
parent92487f5f6ec57cd487edb8c5dda64f9cee28dfff (diff)
Block signals while the meta object gets created
If a COM object emits events and calls QAxEventSink::Invoke while the metaobject is getting constructed, then we might end up with accessing incomplete initialized meta object data when mapping the Invoke call to the corresponding Qt signal. Use a QSignalBlocker while we are generating the meta object, so that the QAxEventSink::Invoke and OnChanged implementations exit early. Pick-to: 6.5 5.15 Fixes: QTBUG-100657 Fixes: QTBUG-96871 Change-Id: If9368ee878bbe56e2fb61ce251383841191b3a6d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io> (cherry picked from commit 690770d8e6c61b8e3834a19e95e3fd816f842182) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/activeqt/container/qaxbase.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp
index 5ba59c3..3463f3c 100644
--- a/src/activeqt/container/qaxbase.cpp
+++ b/src/activeqt/container/qaxbase.cpp
@@ -2945,6 +2945,7 @@ void MetaObjectGenerator::buildMethods(const QMap<QByteArray, Method> &map,
QMetaObject *MetaObjectGenerator::metaObject(const QMetaObject *parentObject, const QByteArray &className)
{
+ QSignalBlocker blockSignals(that ? that->qObject() : nullptr);
if (that) {
readClassInfo();
if (typelib) {