summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsaccessibility.cpp
diff options
context:
space:
mode:
authorJan-Arve Saether <jan-arve.saether@nokia.com>2012-01-18 14:42:13 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-19 08:05:05 +0100
commitec550e28d2b8fa1c6a4e4103f33df1b339862b28 (patch)
treea496e85b730f67e74e66cca87e74ec823e3610b9 /src/plugins/platforms/windows/qwindowsaccessibility.cpp
parentf4d2acdb8ed83fbec7c7236f91dc4af517c09563 (diff)
Remove all references to QAccessible::Self
navigate() to Self does not make any sense (its basically a clone). It seems that its not that useful to return Self from relationTo(), since it was only one place where relationTo() was called where it checked for the Self flag. This was in the windows bridge, and we could easily work around that. If it really turns out that Self is useful, we can always add that enum value back later. Change-Id: I9ebb60da059a843de5e6fcab9e815b919afc6f2a Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsaccessibility.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsaccessibility.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowsaccessibility.cpp b/src/plugins/platforms/windows/qwindowsaccessibility.cpp
index fdf6c9116e..4cc08c7f76 100644
--- a/src/plugins/platforms/windows/qwindowsaccessibility.cpp
+++ b/src/plugins/platforms/windows/qwindowsaccessibility.cpp
@@ -694,7 +694,7 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::accNavigate(long navDir, VARIANT v
case NAVDIR_LEFT:
case NAVDIR_RIGHT:
if (QAccessibleInterface *pIface = accessible->parent()) {
-
+ const int indexOfOurself = pIface->indexOfChild(accessible);
QRect startg = accessible->rect();
QPoint startc = startg.center();
QAccessibleInterface *candidate = 0;
@@ -704,7 +704,7 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::accNavigate(long navDir, VARIANT v
QAccessibleInterface *sibling = 0;
sibling = pIface->child(i);
Q_ASSERT(sibling);
- if ((accessible->relationTo(sibling) & QAccessible::Self) || sibling->state().invisible) {
+ if (i == indexOfOurself || sibling->state().invisible) {
//ignore ourself and invisible siblings
delete sibling;
continue;