summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-02-01 10:00:06 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-01 10:38:23 +0100
commite33e761bb5914988daa1b3e386371e9c367948bb (patch)
treed95aee82fb46898c49ddaba09c2ffb22a407584d
parent7518adbb131ac05fe4e96880e47adcf35fc1c040 (diff)
Accessibility: Use new updateAccessibility() API in widgets.
Change-Id: Id69cc28a54abc675a991f2c657a446f38313ac6e Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
-rw-r--r--src/widgets/dialogs/qdialog.cpp4
-rw-r--r--src/widgets/dialogs/qmessagebox.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsscene.cpp2
-rw-r--r--src/widgets/itemviews/qabstractitemview.cpp12
-rw-r--r--src/widgets/itemviews/qlistview.cpp6
-rw-r--r--src/widgets/itemviews/qtableview.cpp12
-rw-r--r--src/widgets/itemviews/qtreeview.cpp10
-rw-r--r--src/widgets/kernel/qwhatsthis.cpp4
-rw-r--r--src/widgets/kernel/qwidget.cpp18
-rw-r--r--src/widgets/widgets/qabstractbutton.cpp4
-rw-r--r--src/widgets/widgets/qabstractslider.cpp2
-rw-r--r--src/widgets/widgets/qabstractspinbox.cpp4
-rw-r--r--src/widgets/widgets/qcombobox.cpp10
-rw-r--r--src/widgets/widgets/qgroupbox.cpp2
-rw-r--r--src/widgets/widgets/qlabel.cpp2
-rw-r--r--src/widgets/widgets/qlineedit_p.cpp2
-rw-r--r--src/widgets/widgets/qmenu.cpp8
-rw-r--r--src/widgets/widgets/qmenubar.cpp4
-rw-r--r--src/widgets/widgets/qprogressbar.cpp2
-rw-r--r--src/widgets/widgets/qpushbutton.cpp2
-rw-r--r--src/widgets/widgets/qtabbar.cpp4
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol.cpp4
22 files changed, 60 insertions, 60 deletions
diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp
index aac15cd878..f462a362ca 100644
--- a/src/widgets/dialogs/qdialog.cpp
+++ b/src/widgets/dialogs/qdialog.cpp
@@ -748,7 +748,7 @@ void QDialog::setVisible(bool visible)
}
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(this, 0, QAccessible::DialogStart);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::DialogStart, this, 0));
#endif
} else {
@@ -757,7 +757,7 @@ void QDialog::setVisible(bool visible)
#ifndef QT_NO_ACCESSIBILITY
if (isVisible())
- QAccessible::updateAccessibility(this, 0, QAccessible::DialogEnd);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::DialogEnd, this, 0));
#endif
// Reimplemented to exit a modal event loop when the dialog is hidden.
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp
index 8a422c75a0..0f57fa67e1 100644
--- a/src/widgets/dialogs/qmessagebox.cpp
+++ b/src/widgets/dialogs/qmessagebox.cpp
@@ -1463,7 +1463,7 @@ void QMessageBox::showEvent(QShowEvent *e)
d->updateSize();
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(this, 0, QAccessible::Alert);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Alert, this, 0));
#endif
#ifdef Q_OS_WIN
if (const HMENU systemMenu = qt_getWindowsSystemMenu(this)) {
diff --git a/src/widgets/graphicsview/qgraphicsscene.cpp b/src/widgets/graphicsview/qgraphicsscene.cpp
index 6404dc62d4..ce94f80a14 100644
--- a/src/widgets/graphicsview/qgraphicsscene.cpp
+++ b/src/widgets/graphicsview/qgraphicsscene.cpp
@@ -843,7 +843,7 @@ void QGraphicsScenePrivate::setFocusItemHelper(QGraphicsItem *item,
#ifndef QT_NO_ACCESSIBILITY
if (focusItem) {
if (QGraphicsObject *focusObj = focusItem->toGraphicsObject()) {
- QAccessible::updateAccessibility(focusObj, 0, QAccessible::Focus);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Focus, focusObj, 0));
}
}
#endif
diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp
index f49e8f8422..e6ba21e701 100644
--- a/src/widgets/itemviews/qabstractitemview.cpp
+++ b/src/widgets/itemviews/qabstractitemview.cpp
@@ -1112,7 +1112,7 @@ void QAbstractItemView::reset()
#ifdef Q_WS_X11
if (QAccessible::isActive()) {
QAccessible::queryAccessibleInterface(this)->table2Interface()->modelReset();
- QAccessible::updateAccessibility(this, 0, QAccessible::TableModelChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::TableModelChanged, this, 0));
}
#endif
#endif
@@ -3342,7 +3342,7 @@ void QAbstractItemViewPrivate::_q_rowsRemoved(const QModelIndex &index, int star
#ifdef Q_WS_X11
if (QAccessible::isActive()) {
QAccessible::queryAccessibleInterface(q)->table2Interface()->rowsRemoved(index, start, end);
- QAccessible::updateAccessibility(q, 0, QAccessible::TableModelChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::TableModelChanged, q, 0));
}
#endif
#endif
@@ -3422,7 +3422,7 @@ void QAbstractItemViewPrivate::_q_columnsRemoved(const QModelIndex &index, int s
#ifdef Q_WS_X11
if (QAccessible::isActive()) {
QAccessible::queryAccessibleInterface(q)->table2Interface()->columnsRemoved(index, start, end);
- QAccessible::updateAccessibility(q, 0, QAccessible::TableModelChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::TableModelChanged, q, 0));
}
#endif
#endif
@@ -3445,7 +3445,7 @@ void QAbstractItemViewPrivate::_q_rowsInserted(const QModelIndex &index, int sta
Q_Q(QAbstractItemView);
if (QAccessible::isActive()) {
QAccessible::queryAccessibleInterface(q)->table2Interface()->rowsInserted(index, start, end);
- QAccessible::updateAccessibility(q, 0, QAccessible::TableModelChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::TableModelChanged, q, 0));
}
#endif
#endif
@@ -3469,7 +3469,7 @@ void QAbstractItemViewPrivate::_q_columnsInserted(const QModelIndex &index, int
#ifdef Q_WS_X11
if (QAccessible::isActive()) {
QAccessible::queryAccessibleInterface(q)->table2Interface()->columnsInserted(index, start, end);
- QAccessible::updateAccessibility(q, 0, QAccessible::TableModelChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::TableModelChanged, q, 0));
}
#endif
#endif
@@ -3497,7 +3497,7 @@ void QAbstractItemViewPrivate::_q_layoutChanged()
Q_Q(QAbstractItemView);
if (QAccessible::isActive()) {
QAccessible::queryAccessibleInterface(q)->table2Interface()->modelReset();
- QAccessible::updateAccessibility(q, 0, QAccessible::TableModelChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::TableModelChanged, q, 0));
}
#endif
#endif
diff --git a/src/widgets/itemviews/qlistview.cpp b/src/widgets/itemviews/qlistview.cpp
index f94337c46f..8d069a8c7e 100644
--- a/src/widgets/itemviews/qlistview.cpp
+++ b/src/widgets/itemviews/qlistview.cpp
@@ -3169,7 +3169,7 @@ void QListView::currentChanged(const QModelIndex &current, const QModelIndex &pr
if (QAccessible::isActive()) {
if (current.isValid()) {
int entry = visualIndex(current) + 1;
- QAccessible::updateAccessibility(this, entry, QAccessible::Focus);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Focus, this, entry));
}
}
#endif
@@ -3188,12 +3188,12 @@ void QListView::selectionChanged(const QItemSelection &selected,
QModelIndex sel = selected.indexes().value(0);
if (sel.isValid()) {
int entry = visualIndex(sel) + 1;
- QAccessible::updateAccessibility(this, entry, QAccessible::Selection);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Selection, this, entry));
}
QModelIndex desel = deselected.indexes().value(0);
if (desel.isValid()) {
int entry = visualIndex(desel) + 1;
- QAccessible::updateAccessibility(this, entry, QAccessible::SelectionRemove);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::SelectionRemove, this, entry));
}
}
#endif
diff --git a/src/widgets/itemviews/qtableview.cpp b/src/widgets/itemviews/qtableview.cpp
index 965d394e62..7e6420bb53 100644
--- a/src/widgets/itemviews/qtableview.cpp
+++ b/src/widgets/itemviews/qtableview.cpp
@@ -3167,12 +3167,12 @@ void QTableView::currentChanged(const QModelIndex &current, const QModelIndex &p
#ifdef Q_OS_UNIX
Q_D(QTableView);
int entry = d->accessibleTable2Index(current);
- QAccessible::updateAccessibility(this, entry, QAccessible::Focus);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Focus, this, entry));
#else
int entry = visualIndex(current) + 1;
if (horizontalHeader())
++entry;
- QAccessible::updateAccessibility(viewport(), entry, QAccessible::Focus);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Focus, viewport(), entry));
#endif
}
}
@@ -3195,24 +3195,24 @@ void QTableView::selectionChanged(const QItemSelection &selected,
if (sel.isValid()) {
#ifdef Q_OS_UNIX
int entry = d->accessibleTable2Index(sel);
- QAccessible::updateAccessibility(this, entry, QAccessible::Selection);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Selection, this, entry));
#else
int entry = visualIndex(sel);
if (horizontalHeader())
++entry;
- QAccessible::updateAccessibility(viewport(), entry, QAccessible::Selection);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Selection, viewport(), entry));
#endif
}
QModelIndex desel = deselected.indexes().value(0);
if (desel.isValid()) {
#ifdef Q_OS_UNIX
int entry = d->accessibleTable2Index(desel);
- QAccessible::updateAccessibility(this, entry, QAccessible::SelectionRemove);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::SelectionRemove, this, entry));
#else
int entry = visualIndex(sel);
if (horizontalHeader())
++entry;
- QAccessible::updateAccessibility(viewport(), entry, QAccessible::SelectionRemove);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::SelectionRemove, viewport(), entry));
#endif
}
}
diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp
index 72302634d5..179b122805 100644
--- a/src/widgets/itemviews/qtreeview.cpp
+++ b/src/widgets/itemviews/qtreeview.cpp
@@ -2937,7 +2937,7 @@ void QTreeViewPrivate::insertViewItems(int pos, int count, const QTreeViewItem &
#ifndef QT_NO_ACCESSIBILITY
#ifdef Q_OS_UNIX
if (QAccessible::isActive()) {
- QAccessible::updateAccessibility(q, 0, QAccessible::TableModelChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::TableModelChanged, q, 0));
}
#endif
#endif
@@ -2955,7 +2955,7 @@ void QTreeViewPrivate::removeViewItems(int pos, int count)
#ifndef QT_NO_ACCESSIBILITY
#ifdef Q_OS_UNIX
if (QAccessible::isActive()) {
- QAccessible::updateAccessibility(q, 0, QAccessible::TableModelChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::TableModelChanged, q, 0));
}
#endif
#endif
@@ -3769,7 +3769,7 @@ void QTreeView::currentChanged(const QModelIndex &current, const QModelIndex &pr
if (QAccessible::isActive() && current.isValid()) {
#ifdef Q_OS_UNIX
int entry = (visualIndex(current) + (header()?1:0))*current.model()->columnCount()+current.column() + 1;
- QAccessible::updateAccessibility(this, entry, QAccessible::Focus);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Focus, this, entry));
#else
int entry = visualIndex(current) + 1;
if (header())
@@ -3794,13 +3794,13 @@ void QTreeView::selectionChanged(const QItemSelection &selected,
if (sel.isValid()) {
int entry = (visualIndex(sel) + (header()?1:0))*sel.model()->columnCount()+sel.column() + 1;
Q_ASSERT(entry > 0);
- QAccessible::updateAccessibility(this, entry, QAccessible::Selection);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Selection, this, entry));
}
QModelIndex desel = deselected.indexes().value(0);
if (desel.isValid()) {
int entry = (visualIndex(desel) + (header()?1:0))*desel.model()->columnCount()+desel.column() + 1;
Q_ASSERT(entry > 0);
- QAccessible::updateAccessibility(this, entry, QAccessible::SelectionRemove);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::SelectionRemove, this, entry));
}
}
#endif
diff --git a/src/widgets/kernel/qwhatsthis.cpp b/src/widgets/kernel/qwhatsthis.cpp
index b6efb88786..3d8bb5e4bf 100644
--- a/src/widgets/kernel/qwhatsthis.cpp
+++ b/src/widgets/kernel/qwhatsthis.cpp
@@ -411,7 +411,7 @@ QWhatsThisPrivate::QWhatsThisPrivate()
#endif
}
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(this, 0, QAccessible::ContextHelpStart);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::ContextHelpStart, this, 0));
#endif
}
@@ -423,7 +423,7 @@ QWhatsThisPrivate::~QWhatsThisPrivate()
QApplication::restoreOverrideCursor();
#endif
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(this, 0, QAccessible::ContextHelpEnd);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::ContextHelpEnd, this, 0));
#endif
instance = 0;
}
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index e004e15252..9310622a5b 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -5987,7 +5987,7 @@ void QWidget::setFocus(Qt::FocusReason reason)
// menus update the focus manually and this would create bogus events
if (!(f->inherits("QMenuBar") || f->inherits("QMenu") || f->inherits("QMenuItem")))
# endif
- QAccessible::updateAccessibility(f, 0, QAccessible::Focus);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Focus, f, 0));
#endif
#ifndef QT_NO_GRAPHICSVIEW
if (QWExtra *topData = window()->d_func()->extra) {
@@ -6067,7 +6067,7 @@ void QWidget::clearFocus()
#endif
{
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(this, 0, QAccessible::Focus);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Focus, this, 0));
#endif
}
}
@@ -7074,7 +7074,7 @@ void QWidgetPrivate::show_helper()
#ifndef QT_NO_ACCESSIBILITY
if (q->windowType() != Qt::ToolTip) // Tooltips are read aloud twice in MS narrator.
- QAccessible::updateAccessibility(q, 0, QAccessible::ObjectShow);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::ObjectShow, q, 0));
#endif
if (QApplicationPrivate::hidden_focus_widget == q) {
@@ -7165,7 +7165,7 @@ void QWidgetPrivate::hide_helper()
#ifndef QT_NO_ACCESSIBILITY
if (wasVisible)
- QAccessible::updateAccessibility(q, 0, QAccessible::ObjectHide);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::ObjectHide, q, 0));
#endif
}
@@ -7400,7 +7400,7 @@ void QWidgetPrivate::hideChildren(bool spontaneous)
qApp->d_func()->sendSyntheticEnterLeave(widget);
#ifndef QT_NO_ACCESSIBILITY
if (!spontaneous)
- QAccessible::updateAccessibility(widget, 0, QAccessible::ObjectHide);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::ObjectHide, widget, 0));
#endif
}
}
@@ -8254,7 +8254,7 @@ void QWidget::changeEvent(QEvent * event)
case QEvent::EnabledChange:
update();
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(this, 0, QAccessible::StateChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::StateChanged, this, 0));
#endif
break;
@@ -10386,7 +10386,7 @@ void QWidget::setAccessibleName(const QString &name)
{
Q_D(QWidget);
d->accessibleName = name;
- QAccessible::updateAccessibility(this, 0, QAccessible::NameChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::NameChanged, this, 0));
}
QString QWidget::accessibleName() const
@@ -10408,7 +10408,7 @@ void QWidget::setAccessibleDescription(const QString &description)
{
Q_D(QWidget);
d->accessibleDescription = description;
- QAccessible::updateAccessibility(this, 0, QAccessible::DescriptionChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::DescriptionChanged, this, 0));
}
QString QWidget::accessibleDescription() const
@@ -10521,7 +10521,7 @@ void QWidget::updateMicroFocus()
#ifndef QT_NO_ACCESSIBILITY
if (isVisible()) {
// ##### is this correct
- QAccessible::updateAccessibility(this, 0, QAccessible::StateChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::StateChanged, this, 0));
}
#endif
}
diff --git a/src/widgets/widgets/qabstractbutton.cpp b/src/widgets/widgets/qabstractbutton.cpp
index e04e7fcfd2..a398cc1567 100644
--- a/src/widgets/widgets/qabstractbutton.cpp
+++ b/src/widgets/widgets/qabstractbutton.cpp
@@ -503,7 +503,7 @@ void QAbstractButtonPrivate::refresh()
return;
q->update();
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(q, 0, QAccessible::StateChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::StateChanged, q, 0));
#endif
}
@@ -645,7 +645,7 @@ void QAbstractButton::setText(const QString &text)
update();
updateGeometry();
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(this, 0, QAccessible::NameChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::NameChanged, this, 0));
#endif
}
diff --git a/src/widgets/widgets/qabstractslider.cpp b/src/widgets/widgets/qabstractslider.cpp
index 1a3d895304..be193f64f0 100644
--- a/src/widgets/widgets/qabstractslider.cpp
+++ b/src/widgets/widgets/qabstractslider.cpp
@@ -538,7 +538,7 @@ void QAbstractSlider::setValue(int value)
emit sliderMoved((d->position = value));
}
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(this, 0, QAccessible::ValueChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::ValueChanged, this, 0));
#endif
sliderChange(SliderValueChange);
emit valueChanged(value);
diff --git a/src/widgets/widgets/qabstractspinbox.cpp b/src/widgets/widgets/qabstractspinbox.cpp
index e53f57023b..331b4918bd 100644
--- a/src/widgets/widgets/qabstractspinbox.cpp
+++ b/src/widgets/widgets/qabstractspinbox.cpp
@@ -976,7 +976,7 @@ void QAbstractSpinBox::keyPressEvent(QKeyEvent *event)
}
}
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(this, 0, QAccessible::ValueChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::ValueChanged, this, 0));
#endif
return;
}
@@ -1595,7 +1595,7 @@ void QAbstractSpinBoxPrivate::updateState(bool up, bool fromKeyboard /* = false
buttonState = (up ? Up : Down) | (fromKeyboard ? Keyboard : Mouse);
q->stepBy(up ? 1 : -1);
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(q, 0, QAccessible::ValueChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::ValueChanged, q, 0));
#endif
}
}
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index 56a59953bd..a3958cfd1a 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -987,7 +987,7 @@ void QComboBoxPrivate::_q_dataChanged(const QModelIndex &topLeft, const QModelIn
q->update();
}
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(q, 0, QAccessible::NameChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::NameChanged, q, 0));
#endif
}
@@ -1243,7 +1243,7 @@ void QComboBoxPrivate::_q_emitCurrentIndexChanged(const QModelIndex &index)
emit q->currentIndexChanged(index.row());
emit q->currentIndexChanged(itemText(index));
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(q, 0, QAccessible::NameChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::NameChanged, q, 0));
#endif
}
@@ -2583,7 +2583,7 @@ void QComboBox::clear()
Q_D(QComboBox);
d->model->removeRows(0, d->model->rowCount(d->root), d->root);
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(this, 0, QAccessible::NameChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::NameChanged, this, 0));
#endif
}
@@ -2602,7 +2602,7 @@ void QComboBox::clearEditText()
if (d->lineEdit)
d->lineEdit->clear();
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(this, 0, QAccessible::NameChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::NameChanged, this, 0));
#endif
}
@@ -2615,7 +2615,7 @@ void QComboBox::setEditText(const QString &text)
if (d->lineEdit)
d->lineEdit->setText(text);
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(this, 0, QAccessible::NameChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::NameChanged, this, 0));
#endif
}
diff --git a/src/widgets/widgets/qgroupbox.cpp b/src/widgets/widgets/qgroupbox.cpp
index 4dc9bbc87b..17f3a9323a 100644
--- a/src/widgets/widgets/qgroupbox.cpp
+++ b/src/widgets/widgets/qgroupbox.cpp
@@ -249,7 +249,7 @@ void QGroupBox::setTitle(const QString &title)
update();
updateGeometry();
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(this, 0, QAccessible::NameChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::NameChanged, this, 0));
#endif
}
diff --git a/src/widgets/widgets/qlabel.cpp b/src/widgets/widgets/qlabel.cpp
index 815aeaa783..d23fab4083 100644
--- a/src/widgets/widgets/qlabel.cpp
+++ b/src/widgets/widgets/qlabel.cpp
@@ -316,7 +316,7 @@ void QLabel::setText(const QString &text)
#ifndef QT_NO_ACCESSIBILITY
if (accessibleName().isEmpty())
- QAccessible::updateAccessibility(this, 0, QAccessible::NameChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::NameChanged, this, 0));
#endif
}
diff --git a/src/widgets/widgets/qlineedit_p.cpp b/src/widgets/widgets/qlineedit_p.cpp
index 5d8c7eebdb..5687abde3c 100644
--- a/src/widgets/widgets/qlineedit_p.cpp
+++ b/src/widgets/widgets/qlineedit_p.cpp
@@ -144,7 +144,7 @@ void QLineEditPrivate::_q_selectionChanged()
emit q->selectionChanged();
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(q, 0, QAccessible::TextSelectionChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::TextSelectionChanged, q, 0));
#endif
}
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp
index 37d9e34b68..1ad697c430 100644
--- a/src/widgets/widgets/qmenu.cpp
+++ b/src/widgets/widgets/qmenu.cpp
@@ -1085,8 +1085,8 @@ void QMenuPrivate::activateAction(QAction *action, QAction::ActionEvent action_e
#ifndef QT_NO_ACCESSIBILITY
if (QAccessible::isActive()) {
int actionIndex = indexOf(action) + 1;
- QAccessible::updateAccessibility(q, actionIndex, QAccessible::Focus);
- QAccessible::updateAccessibility(q, actionIndex, QAccessible::Selection);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Focus, q, actionIndex));
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Selection, q, actionIndex));
}
#endif
action->showStatusText(topCausedWidget());
@@ -1971,7 +1971,7 @@ void QMenu::popup(const QPoint &p, QAction *atAction)
}
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(this, 0, QAccessible::PopupMenuStart);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::PopupMenuStart, this ,0));
#endif
}
@@ -2117,7 +2117,7 @@ void QMenu::hideEvent(QHideEvent *)
d->eventLoop->exit();
d->setCurrentAction(0);
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(this, 0, QAccessible::PopupMenuEnd);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::PopupMenuEnd, this, 0));
#endif
#ifndef QT_NO_MENUBAR
if (QMenuBar *mb = qobject_cast<QMenuBar*>(d->causedPopup.widget))
diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp
index f353d430c8..543ed0df9e 100644
--- a/src/widgets/widgets/qmenubar.cpp
+++ b/src/widgets/widgets/qmenubar.cpp
@@ -531,8 +531,8 @@ void QMenuBarPrivate::_q_actionHovered()
if (QAccessible::isActive()) {
int actionIndex = actions.indexOf(action);
++actionIndex;
- QAccessible::updateAccessibility(q, actionIndex, QAccessible::Focus);
- QAccessible::updateAccessibility(q, actionIndex, QAccessible::Selection);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Focus, q, actionIndex));
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Selection, q, actionIndex));
}
#endif //QT_NO_ACCESSIBILITY
}
diff --git a/src/widgets/widgets/qprogressbar.cpp b/src/widgets/widgets/qprogressbar.cpp
index e3f4e1c276..eabed2ee62 100644
--- a/src/widgets/widgets/qprogressbar.cpp
+++ b/src/widgets/widgets/qprogressbar.cpp
@@ -314,7 +314,7 @@ void QProgressBar::setValue(int value)
d->value = value;
emit valueChanged(value);
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(this, 0, QAccessible::ValueChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::ValueChanged, this, 0));
#endif
if (d->repaintRequired())
repaint();
diff --git a/src/widgets/widgets/qpushbutton.cpp b/src/widgets/widgets/qpushbutton.cpp
index 6aca49e530..99252c43dc 100644
--- a/src/widgets/widgets/qpushbutton.cpp
+++ b/src/widgets/widgets/qpushbutton.cpp
@@ -376,7 +376,7 @@ void QPushButton::setDefault(bool enable)
}
update();
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(this, 0, QAccessible::StateChanged);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::StateChanged, this, 0));
#endif
}
diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp
index d8dc4347d8..580aea10b9 100644
--- a/src/widgets/widgets/qtabbar.cpp
+++ b/src/widgets/widgets/qtabbar.cpp
@@ -1183,8 +1183,8 @@ void QTabBar::setCurrentIndex(int index)
d->layoutTab(index);
#ifndef QT_NO_ACCESSIBILITY
if (QAccessible::isActive()) {
- QAccessible::updateAccessibility(this, index + 1, QAccessible::Focus);
- QAccessible::updateAccessibility(this, index + 1, QAccessible::Selection);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Focus, this, index + 1));
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Selection, this, index + 1));
}
#endif
emit currentChanged(index);
diff --git a/src/widgets/widgets/qwidgetlinecontrol.cpp b/src/widgets/widgets/qwidgetlinecontrol.cpp
index 055d6f3d7a..c774198d8f 100644
--- a/src/widgets/widgets/qwidgetlinecontrol.cpp
+++ b/src/widgets/widgets/qwidgetlinecontrol.cpp
@@ -758,7 +758,7 @@ void QWidgetLineControl::internalSetText(const QString &txt, int pos, bool edite
#ifndef QT_NO_ACCESSIBILITY
if (changed)
- QAccessible::updateAccessibility(parent(), 0, QAccessible::TextUpdated);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::TextUpdated, parent(), 0));
#endif
}
@@ -1357,7 +1357,7 @@ void QWidgetLineControl::emitCursorPositionChanged()
m_lastCursorPos = m_cursor;
cursorPositionChanged(oldLast, m_cursor);
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::updateAccessibility(parent(), 0, QAccessible::TextCaretMoved);
+ QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::TextCaretMoved, parent(), 0));
#endif
}
}