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. Pick-to: 6.5 6.6 Fixes: QTBUG-114423 Change-Id: Iba6f0b9dfb258e85111326184d7899bf0570a5c1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
f81e39695a
commit
a0b7eee6c6
@ -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…
Reference in New Issue
Block a user