Fix last standard keyboard shortcut

Binary search only counted up to < N-1 items, which does not
include the last value

Change-Id: I40e620db3f834fce8776119d7533c157a4a02492
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
bb10
David Edmundson 2013-09-19 23:20:09 +00:00 committed by The Qt Project
parent b751fcf32a
commit 3edc1a4b91
1 changed files with 1 additions and 1 deletions

View File

@ -547,7 +547,7 @@ QList<QKeySequence> QPlatformTheme::keyBindings(QKeySequence::StandardKey key) c
else {
//We may have several equal values for different platforms, so we must search in both directions
//search forward including current location
for (unsigned int i = mid; i < N - 1 ; ++i) {
for (unsigned int i = mid; i < N ; ++i) {
QKeyBinding current = QPlatformThemePrivate::keyBindings[i];
if (current.standardKey != key)
break;