qt5base-lts/tests/auto
Michael Weghorn 0c0eadc484 a11y: Prevent one case of losing a11y interface when setting event child
9a369a25dd added a
QAccessibleEvent ctor that takes a QAccessibleInterface*
instead of a QObject*.

Retrieving the QAccessibleInterface* later is done using the
interface's unique ID stored in the m_uniqueId member.

However, the fact that m_uniqueId is a member
of the union alongside with m_child means that setting
a child via QAccessibleEvent::setChild also overwrites
the stored unique ID, which breaks retrieving the accessible
interface later.

Fix this for the case where the QAccessibleInterface has
an associated QObject by assigning m_object in the ctor as well.
This means that a QAccessibleEvent created using either of the two
constructors (the one taking the QObject* and the one taking
the QAccessibleInterface* associated with the object) now behaves
the same.

Fixing the case where there is no associated QObject would require
further changes (e.g. adding a member for the QAccessibleInterface*
or making the m_uniqueId member a separate member instead of having
it in a union with m_child). However, I see no way to do so without
breaking the ABI, so that is left unchanged.

This also adds a corresponding test case.

Fixes: QTBUG-105988
Pick-to: 6.4
Change-Id: I71a548af0277a5034e9e207f066fa3e25c5393f3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-27 03:38:16 +00:00
..
bic/data Add BiC data for the new way to do BiC testing 2022-05-12 13:33:41 +03:00
cmake Change the license of CMakeLists.txt file to BSD 2022-08-26 11:33:16 +00:00
concurrent Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
corelib tst_qscopedpointer: port away from deprecated APIs 2022-08-27 02:07:54 +02:00
dbus Port tests away from using q{Set}GlobalQHashSeed 2022-08-26 14:15:24 +02:00
gui Wayland: Skip test that queries window position 2022-08-25 18:04:19 +02:00
guiapplauncher Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
network tst_qdtls: guard usage of the deprecated enum values 2022-08-26 14:15:24 +02:00
opengl Remove the qmake project files 2021-01-07 15:32:28 +01:00
other a11y: Prevent one case of losing a11y interface when setting event child 2022-08-27 03:38:16 +00:00
printsupport tests: Fix tst_qprinterinfo for CUPS printer instances 2022-08-24 14:20:14 +02:00
shared Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
sql Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
testlib Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
tools Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
wasm Resolve window focusing problems on WASM 2022-08-24 17:50:25 +02:00
widgets Replace logging category lcQpaDockWidgets in dock widget auto test 2022-08-26 22:27:50 +02:00
xml Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
CMakeLists.txt Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
network-settings.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00