summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/uiautomation/qwindowsuiaprovidercache.cpp
diff options
context:
space:
mode:
authorJannis Xiong <fly2xj@msn.com>2022-09-16 11:29:49 +0800
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-01-06 13:24:25 +0000
commitcf83bd0d50029b543bc5b47cb15dce047e0ce0cf (patch)
treebc4f80e0026e3cdb4a32ea6abf021d04b8537532 /src/plugins/platforms/windows/uiautomation/qwindowsuiaprovidercache.cpp
parent98c4c4c2129790786193ab02a83cdce9b43a4e35 (diff)
Fix cache maybe invalid while the signal is actived from queue
with default QObject::connect signal may active from next message loop. invalide cache will hit while accessibility interface is called from windows. Invalide cache will lead to a crash Fixes: QTBUG-106653 Change-Id: I5359672bcd60ed6cfb2edf238645225164cb1b88 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 80f44954f6872afb5aa37e6737c3e1ac68ad3577) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/plugins/platforms/windows/uiautomation/qwindowsuiaprovidercache.cpp')
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiaprovidercache.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiaprovidercache.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiaprovidercache.cpp
index c4fee0286f..75f406b891 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiaprovidercache.cpp
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiaprovidercache.cpp
@@ -75,7 +75,7 @@ void QWindowsUiaProviderCache::insert(QAccessible::Id id, QWindowsUiaBaseProvide
m_providerTable[id] = provider;
m_inverseTable[provider] = id;
// Connects the destroyed signal to our slot, to remove deleted objects from the cache.
- QObject::connect(provider, &QObject::destroyed, this, &QWindowsUiaProviderCache::objectDestroyed);
+ QObject::connect(provider, &QObject::destroyed, this, &QWindowsUiaProviderCache::objectDestroyed, Qt::DirectConnection);
}
}