diff options
author | Jan-Arve Saether <jan-arve.saether@nokia.com> | 2012-04-25 10:17:08 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-25 12:43:25 +0200 |
commit | 5a09e71fc38205574a9f1b3b6775845108c3ab1c (patch) | |
tree | 2840afda441f867ff5d128f76f74be4dcefd6aed /src/plugins | |
parent | 3fef4b46350d3bb47447e9f18dfbb31209dfa484 (diff) |
MSAA bridge should not return any IA2-specific roles from get_accRole()
Small cleanup/improvement. This patch just does what the removed ###
says.
Change-Id: I0d16541d2e4b8f948f32734ef0138fde5517932a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/windows/accessible/iaccessible2.cpp | 3 | ||||
-rw-r--r-- | src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp | 10 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/plugins/platforms/windows/accessible/iaccessible2.cpp b/src/plugins/platforms/windows/accessible/iaccessible2.cpp index 132a04dd9c..2e843ef74a 100644 --- a/src/plugins/platforms/windows/accessible/iaccessible2.cpp +++ b/src/plugins/platforms/windows/accessible/iaccessible2.cpp @@ -338,9 +338,6 @@ HRESULT STDMETHODCALLTYPE QWindowsIA2Accessible::get_relations(long maxRelations HRESULT STDMETHODCALLTYPE QWindowsIA2Accessible::role(long *ia2role) { accessibleDebugClientCalls(accessible); - //### Change QAccessibleInterface::role() to return both MSAA and IA2 roles. - // When that is completed, we must patch the MSAA bridge not not return any - // IA2-specific roles from get_accRole(). if (!accessible->isValid()) return E_FAIL; diff --git a/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp b/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp index 6c4d217cb4..5003d9effd 100644 --- a/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp +++ b/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp @@ -998,8 +998,14 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::get_accRole(VARIANT varID, VAR } if (role != QAccessible::NoRole) { - if (role == QAccessible::LayeredPane) - role = QAccessible::Pane; + if (role >= QAccessible::LayeredPane) { + // This block should hopefully only be entered if the AT client + // does not support IAccessible2, since it should prefer IA2::role() then. + if (role == QAccessible::LayeredPane) + role = QAccessible::Pane; + else + role = QAccessible::Client; + } (*pvarRole).vt = VT_I4; (*pvarRole).lVal = role; } else { |