diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-05-07 16:06:22 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-16 14:28:11 +0200 |
commit | 679cd99f3d43ac624ad2683f6d3b1b97b3b2cb0d (patch) | |
tree | 8a39a3167a750456ec95ad8d73c5570f2c01f3d8 /src/widgets/widgets | |
parent | 94f9c9678ac38f77be0e951ee582cc02bac458c1 (diff) |
Accessibility: Update ComboBox text on arrow keys
Use ValueChanged to notify of changes in the ComboBox.
On Linux we need to update name and then send selection-changed for
Orca.
Task-number: QTBUG-36814
Change-Id: Icdd34adddeac532476a6dd910d1e8bd33bcd590b
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r-- | src/widgets/widgets/qcombobox.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 06258cb4a6..f857f4eac0 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -1000,11 +1000,11 @@ void QComboBoxPrivate::_q_dataChanged(const QModelIndex &topLeft, const QModelIn emit q->currentTextChanged(text); } q->update(); - } #ifndef QT_NO_ACCESSIBILITY - QAccessibleEvent event(q, QAccessible::NameChanged); + QAccessibleValueChangeEvent event(q, text); QAccessible::updateAccessibility(&event); #endif + } } void QComboBoxPrivate::_q_rowsInserted(const QModelIndex &parent, int start, int end) @@ -1269,7 +1269,7 @@ void QComboBoxPrivate::_q_emitCurrentIndexChanged(const QModelIndex &index) if (!lineEdit) emit q->currentTextChanged(text); #ifndef QT_NO_ACCESSIBILITY - QAccessibleEvent event(q, QAccessible::NameChanged); + QAccessibleValueChangeEvent event(q, text); QAccessible::updateAccessibility(&event); #endif } @@ -2757,7 +2757,7 @@ void QComboBox::clear() Q_D(QComboBox); d->model->removeRows(0, d->model->rowCount(d->root), d->root); #ifndef QT_NO_ACCESSIBILITY - QAccessibleEvent event(this, QAccessible::NameChanged); + QAccessibleValueChangeEvent event(this, QString()); QAccessible::updateAccessibility(&event); #endif } @@ -2771,7 +2771,7 @@ void QComboBox::clearEditText() if (d->lineEdit) d->lineEdit->clear(); #ifndef QT_NO_ACCESSIBILITY - QAccessibleEvent event(this, QAccessible::NameChanged); + QAccessibleValueChangeEvent event(this, QString()); QAccessible::updateAccessibility(&event); #endif } @@ -2785,7 +2785,7 @@ void QComboBox::setEditText(const QString &text) if (d->lineEdit) d->lineEdit->setText(text); #ifndef QT_NO_ACCESSIBILITY - QAccessibleEvent event(this, QAccessible::NameChanged); + QAccessibleValueChangeEvent event(this, text); QAccessible::updateAccessibility(&event); #endif } |