Mac Accessibility: skip invisible children

Change-Id: I6c3da526ecef60447a658b6b5501282729e9c6f5
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This commit is contained in:
Frederik Gladhorn 2013-06-07 13:09:57 +02:00 committed by The Qt Project
parent 3fb7e5aee9
commit e02c6dd1d3
2 changed files with 6 additions and 0 deletions

View File

@ -145,6 +145,9 @@
for (int i = 0; i < numKids; ++i) {
QAccessibleInterface *child = iface->child(i);
Q_ASSERT(child);
if (child->state().invalid || child->state().invisible)
continue;
QAccessible::Id childId = QAccessible::uniqueId(child);
//qDebug() << " kid: " << childId << child;
QCocoaAccessibleElement *element = [QCocoaAccessibleElement createElementWithId:childId parent:self];

View File

@ -82,6 +82,9 @@
for (int i = 0; i < numKids; ++i) {
QAccessibleInterface *child = m_window->accessibleRoot()->child(i);
Q_ASSERT(child);
if (child->state().invalid || child->state().invisible)
continue;
QAccessible::Id childAxid = QAccessible::uniqueId(child);
QCocoaAccessibleElement *element = [QCocoaAccessibleElement createElementWithId:childAxid parent:self];
[kids addObject: element];