Small cleanup/improvement. This patch just does what the removed ###
says.
Change-Id: I0d16541d2e4b8f948f32734ef0138fde5517932a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
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;
}
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 {