QFontComboBox: inform accessibility about model reset when filter changes
Signals are blocked explicitly, so the modelReset signal that would normally make the view update the accessibility framework does not work. Update accessibility explicitly. Fixes: QTBUG-114423 Change-Id: Iba6f0b9dfb258e85111326184d7899bf0570a5c1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit a0b7eee6c6af8d233e3bb7bd5c39f9059ec994f0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
cd917e8999
commit
864544eb1a
@ -3,6 +3,7 @@
|
||||
|
||||
#include "qfontcombobox.h"
|
||||
|
||||
#include <qaccessible.h>
|
||||
#include <qstringlistmodel.h>
|
||||
#include <qitemdelegate.h>
|
||||
#include <qlistview.h>
|
||||
@ -328,6 +329,13 @@ void QFontComboBoxPrivate::_q_updateModel()
|
||||
{
|
||||
const QSignalBlocker blocker(m);
|
||||
m->setStringList(list);
|
||||
// Since the modelReset signal is blocked the view will not emit an accessibility event
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (QAccessible::isActive()) {
|
||||
QAccessibleTableModelChangeEvent accessibleEvent(q->view(), QAccessibleTableModelChangeEvent::ModelReset);
|
||||
QAccessible::updateAccessibility(&accessibleEvent);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (list.isEmpty()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user