Make NVDA read aloud stuff from a Qt app again.

Previously, NVDA did not read aloud anything from a Qt app.

Change-Id: Ie738e7e7d7acc54f45fab9195adc09bfde930174
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
This commit is contained in:
Jan-Arve Saether 2012-04-24 13:20:07 +02:00 committed by Qt by Nokia
parent 961d460ecf
commit fd87a4c7f6

View File

@ -1363,15 +1363,16 @@ HRESULT STDMETHODCALLTYPE QWindowsIA2Accessible::QueryService(REFGUID guidServic
Q_UNUSED(guidService);
*iface = 0;
accessibleDebug("QWindowsIA2Accessible::QS(): %s", IIDToString(riid).constData());
if (riid == IID_IAccessible || riid == IID_IUnknown || riid == IID_IDispatch) {
*iface = static_cast<IAccessible*>(this);
} else if (/*guidService == IID_IAccessible && */riid == IID_IAccessible2) {
if (guidService == IID_IAccessible && riid == IID_IAccessible2) {
// The conditions for entering here should be ok (from _dicoveringInterfaces in IAccessible2.idl)
*iface = static_cast<IAccessible2*>(this);
} else if (riid == IID_IAccessibleApplication) {
} else if (guidService == IID_IAccessible && (riid == IID_IAccessible || riid == IID_IUnknown || riid == IID_IDispatch)) {
// The above conditions works with AccProbe and NVDA.
*iface = static_cast<IAccessible*>(this);
} else if (riid == IID_IAccessibleApplication) {
*iface = new AccessibleApplication;
return S_OK;
} else {
QueryInterface(riid, iface);
}
if (*iface) {
AddRef();