From 30ad53a0a6b1f6d5d50fe12777dc1045dec22803 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Mon, 9 Jan 2012 13:13:33 +0100 Subject: Make QAccessibleInterface::indexOfChild() 0-based. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Makes the code nicer and more consistent with the rest of the world. Change-Id: I5ba0ee39f5b0afd1a079a3cea9990d123955ed3f Reviewed-by: Jan-Arve Sæther --- src/plugins/platforms/windows/qwindowsaccessibility.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms/windows/qwindowsaccessibility.cpp') 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 { -- cgit v1.2.3