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 15:13:22 +0000
commit61365249a47d6ffa9f848eb0a1a583e13cac8803 (patch)
treeb7204548041f9e11b32fdeb53bb173344fef4e51
parent14319e54f3fdf981695cae5b2319195cfd1060ef (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: 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> (cherry picked from commit c758be532150d33fe840a99325fe10df2e9efaf8)
-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) {