aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4mathobject.cpp
diff options
context:
space:
mode:
authorLiang Qi <[email protected]>2023-10-04 22:06:37 +0200
committerLiang Qi <[email protected]>2023-10-06 20:31:35 +0200
commitc1d07c8192df3dd708507eeebc77c3f84053dfe3 (patch)
treea87b2197b2a61a536ef6769ef509d6f9f19263cb /src/qml/jsruntime/qv4mathobject.cpp
parentf55e6054f0dc8cccc8e7ee1bd61915c0f0ad5d7e (diff)
Accessibility: respect value in attached Accessible in controls
QQuickItemPrivate::accessibleRole is virtual and called by the framework to determine the role of an item. The default implementation checks and respects a possible Accessible attached object. However, subclasses that override the virtual don't, so the attached properties are ignored, and the class-specific implementation wins. This makes it impossible to change the role of e.g. a checkable button. To fix that, move the code respecting the attached object into a non- virtual function that the framework calls instead, and only call the virtual member if there is no attached object, or if that object is not initialized with a role. Replace calls to the virtual from the framework with calls to the non-virtual wrapper. Do this for both QQuickItem and for QQuickPopup, and adjust the logic in QQuickControl types that create an attached object and initialize it's role when accessibility becomes active. Use the non-overridable effective role value for that as well. Add a test case, and to avoid any new framework calls to the virtual, make it private. This is the qtdeclarative part for 5.15. Fixes: QTBUG-110114 Fixes: QTBUG-84858 Change-Id: Ia709cecbd181b6d8ee3297a4af60c1e7db9a2c51 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Jan Arve Sæther <[email protected]> (cherry modified from commit 3c08d08ae2bbd449cc0579a1b3cb499383c7a60c) Reviewed-by: Liang Qi <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4mathobject.cpp')
0 files changed, 0 insertions, 0 deletions