From c10a0c29d35463c117df4bde556e9f44b55dd384 Mon Sep 17 00:00:00 2001 From: Jan-Arve Saether Date: Wed, 25 Apr 2012 10:46:30 +0200 Subject: Map QAccessible::Role to the proper IA2Role. All enum values after the MSAA-specific roles needs a special mapping. Change-Id: I6c77abf09b68d2d3d772937be986d532db2e5292 Reviewed-by: Frederik Gladhorn --- src/plugins/platforms/windows/accessible/iaccessible2.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/accessible/iaccessible2.cpp b/src/plugins/platforms/windows/accessible/iaccessible2.cpp index 2e843ef74a..71a26aff6b 100644 --- a/src/plugins/platforms/windows/accessible/iaccessible2.cpp +++ b/src/plugins/platforms/windows/accessible/iaccessible2.cpp @@ -341,7 +341,16 @@ HRESULT STDMETHODCALLTYPE QWindowsIA2Accessible::role(long *ia2role) if (!accessible->isValid()) return E_FAIL; - *ia2role = accessible->role(); + long r = accessible->role(); + + switch (r) { + case QAccessible::LayeredPane: r = IA2_ROLE_LAYERED_PANE; break; + case QAccessible::Terminal: r = IA2_ROLE_TERMINAL; break; + case QAccessible::Desktop: r = IA2_ROLE_DESKTOP_PANE; break; + default: break; + } + + *ia2role = r; return S_OK; } -- cgit v1.2.3