summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Arve Saether <jan-arve.saether@nokia.com>2012-04-25 10:46:30 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-26 11:45:01 +0200
commitc10a0c29d35463c117df4bde556e9f44b55dd384 (patch)
tree48ddcf0a901bfc88362f10f1ca7919712667c7f7
parent5c882dbb8955e3bcbd77027aae379aca50e9dfaa (diff)
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 <frederik.gladhorn@nokia.com>
-rw-r--r--src/plugins/platforms/windows/accessible/iaccessible2.cpp11
1 files changed, 10 insertions, 1 deletions
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;
}