Commit ae6acb42 authored by Friedemann Kleint's avatar Friedemann Kleint Committed by Qt by Nokia

Accessibility: Use new updateAccessibility() API in declarative.

Change-Id: I7ab5c767c9d21c9cad1ee7f7c1f6e21ed4dccef3
Reviewed-by: default avatarJan-Arve Sæther <jan-arve.saether@nokia.com>
parent a83dafe4
......@@ -59,7 +59,7 @@ QDeclarativeAccessibleAttached::QDeclarativeAccessibleAttached(QObject *parent)
// Enable accessibility for items with accessible content. This also
// enables accessibility for the ancestors of such items.
item->d_func()->setAccessibleFlagAndListener();
QAccessible::updateAccessibility(item, 0, QAccessible::ObjectCreated);
QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::ObjectCreated, item, 0));
}
QDeclarativeAccessibleAttached::~QDeclarativeAccessibleAttached()
......
......@@ -83,7 +83,7 @@ public:
{
m_name = name;
emit nameChanged();
QAccessible::updateAccessibility(parent(), 0, QAccessible::NameChanged);
QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::NameChanged, parent(), 0));
}
QString description() const { return m_description; }
......@@ -91,7 +91,7 @@ public:
{
m_description = description;
emit descriptionChanged();
QAccessible::updateAccessibility(parent(), 0, QAccessible::DescriptionChanged);
QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::DescriptionChanged, parent(), 0));
}
// Factory function
......
......@@ -148,7 +148,7 @@ QQuickAccessibleAttached::QQuickAccessibleAttached(QObject *parent)
// Enable accessibility for items with accessible content. This also
// enables accessibility for the ancestors of souch items.
item->d_func()->setAccessibleFlagAndListener();
QAccessible::updateAccessibility(item, 0, QAccessible::ObjectCreated);
QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::ObjectCreated, item, 0));
}
QQuickAccessibleAttached::~QQuickAccessibleAttached()
......
......@@ -85,7 +85,7 @@ public:
if (name != m_name) {
m_name = name;
emit nameChanged();
QAccessible::updateAccessibility(parent(), 0, QAccessible::NameChanged);
QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::NameChanged, parent(), 0));
}
}
......@@ -95,7 +95,7 @@ public:
if (m_description != description) {
m_description = description;
emit descriptionChanged();
QAccessible::updateAccessibility(parent(), 0, QAccessible::DescriptionChanged);
QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::DescriptionChanged, parent(), 0));
}
}
......
......@@ -2967,7 +2967,7 @@ void QQuickItem::inputMethodEvent(QInputMethodEvent *event)
void QQuickItem::focusInEvent(QFocusEvent *)
{
QAccessible::updateAccessibility(this, 0, QAccessible::Focus);
QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Focus, this, 0));
}
void QQuickItem::focusOutEvent(QFocusEvent *)
......@@ -3950,7 +3950,7 @@ void QQuickItemPrivate::setEffectiveVisibleRecur(bool newEffectiveVisible)
}
if (isAccessible)
QAccessible::updateAccessibility(q, 0, effectiveVisible ? QAccessible::ObjectShow : QAccessible::ObjectHide );
QAccessible::updateAccessibility(QAccessibleEvent(effectiveVisible ? QAccessible::ObjectShow : QAccessible::ObjectHide, q, 0));
emit q->visibleChanged();
}
......
......@@ -3232,7 +3232,7 @@ void QQuickTextInputPrivate::internalSetText(const QString &txt, int pos, bool e
Q_UNUSED(changed)
#else
if (changed)
QAccessible::updateAccessibility(q, 0, QAccessible::TextUpdated);
QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::TextUpdated, q, 0));
#endif
}
......@@ -3862,7 +3862,7 @@ bool QQuickTextInputPrivate::emitCursorPositionChanged()
}
#ifndef QT_NO_ACCESSIBILITY
QAccessible::updateAccessibility(q, 0, QAccessible::TextCaretMoved);
QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::TextCaretMoved, q, 0));
#endif
return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment