From 3edc1a4b91af23abc55c8d3ef29f45224ab06dae Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Thu, 19 Sep 2013 23:20:09 +0000 Subject: [PATCH] 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 --- src/gui/kernel/qplatformtheme.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qplatformtheme.cpp b/src/gui/kernel/qplatformtheme.cpp index 18ac9dc088..c74b2d42a8 100644 --- a/src/gui/kernel/qplatformtheme.cpp +++ b/src/gui/kernel/qplatformtheme.cpp @@ -547,7 +547,7 @@ QList 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;