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>
This commit is contained in:
Jan-Arve Saether 2012-04-25 10:46:30 +02:00 committed by Qt by Nokia
parent 5c882dbb89
commit c10a0c29d3

View File

@ -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;
}