summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@nokia.com>2012-01-09 13:13:33 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-11 11:18:51 +0100
commit30ad53a0a6b1f6d5d50fe12777dc1045dec22803 (patch)
tree8801287de779c5554e86daafeac8bed69c2ea680 /src/plugins/platforms/windows
parent630131d58542dc3a69587b4a982b04544d30b92b (diff)
Make QAccessibleInterface::indexOfChild() 0-based.
Makes the code nicer and more consistent with the rest of the world. Change-Id: I5ba0ee39f5b0afd1a079a3cea9990d123955ed3f Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Diffstat (limited to 'src/plugins/platforms/windows')
-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 afd92701f7..82e65f66b5 100644
--- a/src/plugins/platforms/windows/qwindowsaccessibility.cpp
+++ b/src/plugins/platforms/windows/qwindowsaccessibility.cpp
@@ -676,8 +676,8 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::accNavigate(long navDir, VARIANT v
if (parent) {
int index = parent->indexOfChild(accessible);
index += (navDir == NAVDIR_NEXT) ? 1 : -1;
- if (index > 0 && index <= parent->childCount())
- acc = parent->child(index - 1);
+ if (index >= 0 && index < parent->childCount())
+ acc = parent->child(index);
delete parent;
}
} else {