summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2023-09-11 13:42:25 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2023-09-22 10:25:08 +0200
commit690770d8e6c61b8e3834a19e95e3fd816f842182 (patch)
tree86d50caeef209506a55994642f2b046a635d800c
parentecbaf89024f8517b719fe4db0f49cc928edccd16 (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.6 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>
-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) {