qt6-bb10/src
Morten Johan Sørvig 8bccf93300 Make the QPlatformTheme::keyBindings() search deterministic
QPlatformTheme::keyBindings() performs a binary search
into an ordered list of StandardKey -> Key Sequence
mappings where each StandardKey can have multiple
key sequences.

Previously the order of the Key Sequences in the
returned list would be indeterministic and, except
for the designated pri-1 key sequence, would not
necessarily correspond to the list order. (The
ordering was dependent on where the binary search
"hits", which again depends on the size of the list.)

This caused trouble when adding mappings, since it
would change the order in the returned key sequence
list for existing mappings and confusingly cause
(apparently) unrelated test failures.

Fix this by replacing the manually coded binary search
with std::equal_range.

One test case needed to be fixed up because it had the
result in the wrong order (verified by looking at
QPlatformTheme::keyBindings).

Change-Id: I555ca2736b1a8e6454dc79645a8246f80119cfc2
Done-with: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-02-12 19:40:21 +00:00
..
3rdparty Update bundled HarfBuzz to 0.9.39 2015-02-12 10:05:24 +00:00
android Update copyright headers 2015-02-11 06:49:51 +00:00
angle make the installed meta files play nicely with sysroots 2015-02-05 14:26:44 +00:00
concurrent Update copyright headers 2015-02-11 06:49:51 +00:00
corelib QDateTime: prepare for constexpr'ification 2015-02-12 19:40:14 +00:00
dbus Update copyright headers 2015-02-11 06:49:51 +00:00
gui Make the QPlatformTheme::keyBindings() search deterministic 2015-02-12 19:40:21 +00:00
network Network: Fix operator<<(QDebug, ...) operations 2015-02-12 10:08:20 +00:00
opengl Update copyright headers 2015-02-11 06:49:51 +00:00
openglextensions Update copyright headers 2015-02-11 06:49:51 +00:00
platformheaders Update copyright headers 2015-02-11 06:49:51 +00:00
platformsupport D-Bus tray icons: try to use them with QGenericUnixTheme 2015-02-12 13:24:11 +00:00
plugins Fix accessibility lines on OS X 2015-02-12 18:29:42 +00:00
printsupport Update copyright headers 2015-02-11 06:49:51 +00:00
sql Update copyright headers 2015-02-11 06:49:51 +00:00
testlib Update copyright headers 2015-02-11 06:49:51 +00:00
tools Make qdbusxml2cpp output reproducible 2015-02-12 18:34:17 +00:00
widgets QtWidgets: assorted migrations to QString::asprintf 2015-02-12 19:39:49 +00:00
winmain Update copyright headers 2015-02-11 06:49:51 +00:00
xml Update copyright headers 2015-02-11 06:49:51 +00:00
src.pro Remove unnecessary dependency 2015-01-02 13:19:08 +01:00