diff options
author | Jan Arve Saether <jan-arve.saether@digia.com> | 2014-09-25 11:41:44 +0200 |
---|---|---|
committer | Jan Arve Sæther <jan-arve.saether@theqtcompany.com> | 2014-10-21 20:32:52 +0200 |
commit | f28755240b9d72eb748c2f9469a58601bffdecf1 (patch) | |
tree | 6833b7e166be3480662e31ebe3da0f3e9daaa13d /src/quick/items/qquickitem.cpp | |
parent | dbbb514a084440c05d17e44c7992726d94b26750 (diff) |
Support Accessible.ignored on non-leaf items
Ignoring items with children will make the children appear as children of
the parent of the ignored item.
Since setAccessibleFlagAndListener now only sets the flag we also rename
the function to just setAccessible
Change-Id: I79fc311509a3e454b4698274c63ad0e879fb93e3
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Diffstat (limited to 'src/quick/items/qquickitem.cpp')
-rw-r--r-- | src/quick/items/qquickitem.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index ebe136e556..a1376682af 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -1607,17 +1607,9 @@ void QQuickItemPrivate::setLayoutMirror(bool mirror) } } -void QQuickItemPrivate::setAccessibleFlagAndListener() +void QQuickItemPrivate::setAccessible() { - Q_Q(QQuickItem); - QQuickItem *item = q; - while (item) { - if (item->d_func()->isAccessible) - break; // already set - grandparents should have the flag set as well. - - item->d_func()->isAccessible = true; - item = item->d_func()->parentItem; - } + isAccessible = true; } /*! @@ -2584,9 +2576,6 @@ void QQuickItem::setParentItem(QQuickItem *parentItem) d->itemChange(ItemParentHasChanged, d->parentItem); d->parentNotifier.notify(); - if (d->isAccessible && d->parentItem) { - d->parentItem->d_func()->setAccessibleFlagAndListener(); - } emit parentChanged(d->parentItem); if (isVisible() && d->parentItem) |