From: Frederik Gladhorn Date: Wed, 7 Mar 2012 18:50:23 +0000 (+0100) Subject: Send accessibility updates for the right item. X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=b262e81d52e8c269063e1de829aea311dff7c632;p=konrad%2Fqtdeclarative.git Send accessibility updates for the right item. Child 0 means the first child. The index needs to be -1 which the default ctor does. Change-Id: I71fbdf5a15dd4593178cb250f06d42f601e40d4d Reviewed-by: Jan-Arve Sæther --- diff --git a/src/quick/items/qquickaccessibleattached.cpp b/src/quick/items/qquickaccessibleattached.cpp index 1e07d96..20082e8 100644 --- a/src/quick/items/qquickaccessibleattached.cpp +++ b/src/quick/items/qquickaccessibleattached.cpp @@ -144,7 +144,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(QAccessibleEvent(QAccessible::ObjectCreated, item, 0)); + QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::ObjectCreated, item)); } QQuickAccessibleAttached::~QQuickAccessibleAttached() diff --git a/src/quick/items/qquickaccessibleattached_p.h b/src/quick/items/qquickaccessibleattached_p.h index 5eea44b..4fc6d90 100644 --- a/src/quick/items/qquickaccessibleattached_p.h +++ b/src/quick/items/qquickaccessibleattached_p.h @@ -85,7 +85,7 @@ public: if (name != m_name) { m_name = name; emit nameChanged(); - QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::NameChanged, parent(), 0)); + QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::NameChanged, parent())); } } @@ -95,7 +95,7 @@ public: if (m_description != description) { m_description = description; emit descriptionChanged(); - QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::DescriptionChanged, parent(), 0)); + QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::DescriptionChanged, parent())); } } diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index f2ec0d6..8f9a060 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -3018,7 +3018,7 @@ void QQuickItem::inputMethodEvent(QInputMethodEvent *event) void QQuickItem::focusInEvent(QFocusEvent *) { - QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Focus, this, 0)); + QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::Focus, this)); } void QQuickItem::focusOutEvent(QFocusEvent *) @@ -3984,7 +3984,7 @@ bool QQuickItemPrivate::setEffectiveVisibleRecur(bool newEffectiveVisible) itemChange(QQuickItem::ItemVisibleHasChanged, effectiveVisible); if (isAccessible) - QAccessible::updateAccessibility(QAccessibleEvent(effectiveVisible ? QAccessible::ObjectShow : QAccessible::ObjectHide, q, 0)); + QAccessible::updateAccessibility(QAccessibleEvent(effectiveVisible ? QAccessible::ObjectShow : QAccessible::ObjectHide, q)); emit q->visibleChanged(); if (childVisibilityChanged) diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp index a06c174..3b62e99 100644 --- a/src/quick/items/qquicktextinput.cpp +++ b/src/quick/items/qquicktextinput.cpp @@ -3265,7 +3265,7 @@ void QQuickTextInputPrivate::internalSetText(const QString &txt, int pos, bool e Q_UNUSED(changed) #else if (changed) - QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::TextUpdated, q, 0)); + QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::TextUpdated, q)); #endif } @@ -3891,7 +3891,7 @@ bool QQuickTextInputPrivate::emitCursorPositionChanged() } #ifndef QT_NO_ACCESSIBILITY - QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::TextCaretMoved, q, 0)); + QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::TextCaretMoved, q)); #endif return true;