Add press action to QAccessibleCombobox
VoiceOver expects press to open the combobox. Task-number: QTBUG-37922 Change-Id: Iee7b7974db097e4e2444202c703bd587e1576fe0 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>bb10
parent
62a436cf3b
commit
386292837b
|
|
@ -315,19 +315,19 @@ QString QAccessibleComboBox::text(QAccessible::Text t) const
|
|||
|
||||
QStringList QAccessibleComboBox::actionNames() const
|
||||
{
|
||||
return QStringList(showMenuAction());
|
||||
return QStringList() << showMenuAction() << pressAction();
|
||||
}
|
||||
|
||||
QString QAccessibleComboBox::localizedActionDescription(const QString &actionName) const
|
||||
{
|
||||
if (actionName == showMenuAction())
|
||||
if (actionName == showMenuAction() || actionName == pressAction())
|
||||
return QComboBox::tr("Open the combo box selection popup");
|
||||
return QString();
|
||||
}
|
||||
|
||||
void QAccessibleComboBox::doAction(const QString &actionName)
|
||||
{
|
||||
if (actionName == showMenuAction()) {
|
||||
if (actionName == showMenuAction() || actionName == pressAction()) {
|
||||
if (comboBox()->view()->isVisible()) {
|
||||
comboBox()->hidePopup();
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -3283,7 +3283,7 @@ void tst_QAccessibility::comboBoxTest()
|
|||
|
||||
QVERIFY(!combo.view()->isVisible());
|
||||
QVERIFY(iface->actionInterface());
|
||||
QCOMPARE(iface->actionInterface()->actionNames(), QStringList() << QAccessibleActionInterface::showMenuAction());
|
||||
QCOMPARE(iface->actionInterface()->actionNames(), QStringList() << QAccessibleActionInterface::showMenuAction() << QAccessibleActionInterface::pressAction());
|
||||
iface->actionInterface()->doAction(QAccessibleActionInterface::showMenuAction());
|
||||
QTRY_VERIFY(combo.view()->isVisible());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue