qt6-bb10/tests/auto
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
..
android Update copyright headers 2015-02-11 06:49:51 +00:00
bic/data test: Add 5.1.0 bic data for linux-gcc-ia32 2013-07-08 21:47:36 +02:00
cmake Update text to the new license header 2015-02-12 18:29:40 +00:00
compilerwarnings/data Update copyright headers 2015-02-11 06:49:51 +00:00
concurrent Update copyright headers 2015-02-11 06:49:51 +00:00
corelib QtCore: assorted migrations to QString::asprintf 2015-02-12 19:40:04 +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
guiapplauncher
installed_cmake Add a unit test for testing Qt in its install location. 2013-07-02 23:08:54 +02:00
network QAbstractSocket: remove unneeded cleanup calls and private member 2015-02-11 21:19:13 +00:00
opengl Update copyright headers 2015-02-11 06:49:51 +00:00
other Update copyright headers 2015-02-11 06:49:51 +00:00
printsupport Update copyright headers 2015-02-11 06:49:51 +00:00
shared 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 Update copyright headers 2015-02-11 06:49:51 +00:00
widgets QtWidgets: assorted migrations to QString::asprintf 2015-02-12 19:39:49 +00:00
xml Update copyright headers 2015-02-11 06:49:51 +00:00
auto.pro Temporarily disable the QtDBus tests if the session bus isn't available 2014-12-23 12:22:56 +01:00
network-settings.h Update copyright headers 2015-02-11 06:49:51 +00:00
qtest-config.h Update copyright headers 2015-02-11 06:49:51 +00:00
test.pl Update copyright headers 2015-02-11 06:49:51 +00:00