diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/accessible/qaccessible.h | 5 | ||||
-rw-r--r-- | src/widgets/accessible/qaccessiblewidget.cpp | 93 |
2 files changed, 2 insertions, 96 deletions
diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h index bafd3a8a6b..89036281b8 100644 --- a/src/gui/accessible/qaccessible.h +++ b/src/gui/accessible/qaccessible.h @@ -307,11 +307,6 @@ public: enum RelationFlag { Unrelated = 0x00000000, Self = 0x00000001, - - Covers = 0x00001000, - Covered = 0x00002000, - GeometryMask = 0x0000ff00, - FocusChild = 0x00010000, Label = 0x00020000, Labelled = 0x00040000, diff --git a/src/widgets/accessible/qaccessiblewidget.cpp b/src/widgets/accessible/qaccessiblewidget.cpp index ae09b011dd..f4b73b5d3c 100644 --- a/src/widgets/accessible/qaccessiblewidget.cpp +++ b/src/widgets/accessible/qaccessiblewidget.cpp @@ -361,34 +361,8 @@ QAccessible::Relation QAccessibleWidget::relationTo(const QAccessibleInterface * if (inverse & QAccessible::Label) relation |= QAccessible::Labelled; - if(o == object()) { - return relation | QAccessible::Self; - } - - QObject *parent = object()->parent(); - if (o->parent() == parent) { - QAccessibleInterface *sibIface = QAccessible::queryAccessibleInterface(o); - Q_ASSERT(sibIface); - QRect wg = rect(); - QRect sg = sibIface->rect(); - if (wg.intersects(sg)) { - QAccessibleInterface *pIface = 0; - pIface = sibIface->parent(); - if (pIface && !(sibIface->state().invisible | state().invisible)) { - int wi = pIface->indexOfChild(this); - int si = pIface->indexOfChild(sibIface); - - if (wi > si) - relation |= QAccessible::Covers; - else - relation |= QAccessible::Covered; - } - delete pIface; - } - delete sibIface; - - return relation; - } + if(o == object()) + relation |= QAccessible::Self; return relation; } @@ -422,69 +396,6 @@ int QAccessibleWidget::navigate(QAccessible::RelationFlag relation, int entry, QObject *targetObject = 0; switch (relation) { - case QAccessible::Covers: - if (entry > 0) { - QAccessibleInterface *pIface = parent(); - if (!pIface) - return -1; - - QRect r = rect(); - int sibCount = pIface->childCount(); - QAccessibleInterface *sibling = 0; - // FIXME: this code looks very suspicious - // why start at this index? - for (int i = pIface->indexOfChild(this) + 2; i <= sibCount && entry; ++i) { - sibling = pIface->child(i - 1); - if (!sibling || (sibling->state().invisible)) { - delete sibling; - sibling = 0; - continue; - } - if (sibling->rect().intersects(r)) - --entry; - if (!entry) - break; - delete sibling; - sibling = 0; - } - delete pIface; - *target = sibling; - if (*target) - return 0; - } - break; - case QAccessible::Covered: - if (entry > 0) { - QAccessibleInterface *pIface = QAccessible::queryAccessibleInterface(parentObject()); - if (!pIface) - return -1; - - QRect r = rect(); - int index = pIface->indexOfChild(this); - QAccessibleInterface *sibling = 0; - // FIXME: why end at index? - for (int i = 0; i < index && entry; ++i) { - sibling = pIface->child(i); - Q_ASSERT(sibling); - if (!sibling || (sibling->state().invisible)) { - delete sibling; - sibling = 0; - continue; - } - if (sibling->rect().intersects(r)) - --entry; - if (!entry) - break; - delete sibling; - sibling = 0; - } - delete pIface; - *target = sibling; - if (*target) - return 0; - } - break; - // Logical case QAccessible::FocusChild: { |