From 3fef4b46350d3bb47447e9f18dfbb31209dfa484 Mon Sep 17 00:00:00 2001 From: Jan-Arve Saether Date: Wed, 25 Apr 2012 09:13:07 +0200 Subject: Do not map LayeredPane and Terminal to the wrong MSAA role Microsoft did at some point extend the roles in MSAA with two extra roles (ROLE_SYSTEM_IPADDRESS and ROLE_SYSTEM_OUTLINEBUTTON). These are defined in oleacc.h as: #define ROLE_SYSTEM_IPADDRESS ( 0x3f ) #define ROLE_SYSTEM_OUTLINEBUTTON ( 0x40 ) This means that LayeredPane will map to ROLE_SYSTEM_IPADDRESS and Terminal will map to ROLE_SYSTEM_OUTLINEBUTTON, which is obviously wrong. We now reserve some valuespace for more roles to reduce the likelyness of any collisions in the future. Having the reserved area also serves as a way of indicating the boundary between the "MSAA" enums and other enums. Change-Id: Ic67a1a7200382fed3040e69b3e8856376ba642ac Reviewed-by: Frederik Gladhorn --- src/gui/accessible/qaccessible.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/gui/accessible') diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h index c3dc826714..2e0019705f 100644 --- a/src/gui/accessible/qaccessible.h +++ b/src/gui/accessible/qaccessible.h @@ -293,10 +293,12 @@ public: PageTabList = 0x0000003C, Clock = 0x0000003D, Splitter = 0x0000003E, + // Reserved space in case MSAA roles needs to be added + // Additional Qt roles where enum value does not map directly to MSAA: - LayeredPane = 0x0000003F, - Terminal = 0x00000040, - Desktop = 0x00000041, + LayeredPane = 0x00000080, + Terminal = 0x00000081, + Desktop = 0x00000082, UserRole = 0x0000ffff }; -- cgit v1.2.3