diff options
author | Jan-Arve Saether <jan-arve.saether@nokia.com> | 2012-01-18 14:02:23 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-19 00:17:38 +0100 |
commit | 67a3698b3c558b5bd9fbd2e3b0121bab8c949c95 (patch) | |
tree | 342a16a65482860924322c1b68729a203d6a33b9 /src/widgets | |
parent | f4ea85f8fe35cb30aed73242bf93e869c3c74a0d (diff) | |
download | qtbase-67a3698b3c558b5bd9fbd2e3b0121bab8c949c95.tar.gz |
Remove all references to QAccessible::(Covers|Covered)
These were not used in any bridges, and none of the bridges
(MSAA, Cocoa, AT-SPI/IA2) can hardly make use of this information.
Change-Id: If3cad6b6c1928535dd932f46c9ec6883a4a19c76
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/accessible/qaccessiblewidget.cpp | 93 |
1 files changed, 2 insertions, 91 deletions
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: { |