From 8d28f263aa14cc450085c9df3623a483b6021c56 Mon Sep 17 00:00:00 2001 From: Jan-Arve Saether Date: Tue, 27 Mar 2012 07:09:22 +0200 Subject: Fix IAccessible2 for Windows, enable MSAA/IAccessible for MinGW. Commit 5e9089135bfe7db7d7a43c9ee4d4c24ab8f6458d had some problems: * It left out the cast to IServiceProvider in the refactoring of QueryInterface. This broke IAccessible2. * It also failed to enable the codepath for MinGW inside wrap(), which effectively caused MSAA for MinGW to be disabled. It also adds an autotest to the bridge (finally). It is simple, but it should help avoiding committing stuff that completely breaks the bridge. Change-Id: I459d89c3bdb93e54ddea85872b50fc1dba0fe4a0 Reviewed-by: Friedemann Kleint --- src/plugins/platforms/windows/accessible/iaccessible2.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/windows/accessible/iaccessible2.cpp') diff --git a/src/plugins/platforms/windows/accessible/iaccessible2.cpp b/src/plugins/platforms/windows/accessible/iaccessible2.cpp index c3d5c543cf..be680e7d48 100644 --- a/src/plugins/platforms/windows/accessible/iaccessible2.cpp +++ b/src/plugins/platforms/windows/accessible/iaccessible2.cpp @@ -169,7 +169,9 @@ HRESULT STDMETHODCALLTYPE QWindowsIA2Accessible::QueryInterface(REFIID id, LPVOI { HRESULT hr = QWindowsMsaaAccessible::QueryInterface(id, iface); if (!SUCCEEDED(hr)) { - if (id == IID_IAccessible2) { + if (id == IID_IServiceProvider) { + *iface = (IServiceProvider*)this; + } else if (id == IID_IAccessible2) { *iface = (IAccessible2*)this; } else if (id == IID_IAccessibleAction) { if (accessible->actionInterface()) -- cgit v1.2.3