Accessibility Windows: Add shortcuts to name

Under windows it is customary to add the shortcut (e.g. Ctrl+O) to the
accessible name.

Task-number: QTBUG-38915
Change-Id: Ib79f8624346a1d9d08381e815383ddcdda2d0488
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This commit is contained in:
Frederik Gladhorn 2014-07-03 15:20:03 +02:00
parent 01f1e10695
commit 3066cb37a9

View File

@ -890,6 +890,11 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::get_accName(VARIANT varID, BST
}
}
}
QString shortcut = accessible->text(QAccessible::Accelerator);
if (!shortcut.isEmpty())
name.append(QLatin1Char(' ') + shortcut);
if (name.size()) {
*pszName = QStringToBSTR(name);
return S_OK;