qt6-bb10/tests/auto/corelib
Marc Mutz 9e5e30fa13 QStringMatcher: fix setCaseSensitivity() on a non-QString-backed matcher
When a non-QString-backed mode (via the (QChar*, int) ctor) was added
for Qt 4.5, the author forgot to adjust the setCaseSensitivity()
function.  It still uses q_pattern instead of (p.uc, p.len) as the
pattern for which to create the skip-table. Since there is no
setPattern() overload for this mode, the correctness of the matcher is
not harmed by this, but its performance degrades to that of a linear
scan: the skip-table, being filled from an empty pattern, will be
all-zeros, sending bm_find() into the 'possible match' case at every
character.

Since matching is still correct, but slow, it's not possible to write
a test for this. I did, however, leave my attempts in the auto-test,
for when we add QStringView overloads of setPattern() which will then
be able to expose the bug.

Change-Id: I7b803e8624b0352a0a974900affbbfc0c260d93b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-02-07 16:31:00 +00:00
..
animation Stabilize tst_QPropertyAnimation::noStartValue() 2017-01-25 11:36:41 +00:00
codecs tst_utf8: remove duplicate nonCharacters() data 2017-01-10 18:39:31 +00:00
global tst_qhooks: test that it's possible to chain multiple hooks together 2016-11-18 15:22:32 +00:00
io Reset QFileDevicePrivate::cachedSize on file close 2017-02-06 07:36:24 +00:00
itemmodels QIPM: Persist model indexes after emitting layoutChange, not before 2016-12-21 01:37:50 +00:00
json Merge remote-tracking branch 'origin/5.7' into 5.8 2016-11-16 12:35:36 +01:00
kernel Use a precise timer in tst_QTimer::remainingTime 2017-02-05 18:19:51 +00:00
mimetypes tests/auto/corelib/mimetypes: use local QThreadPool 2016-09-17 06:47:05 +00:00
plugin Convert the old feature system 2016-09-15 08:24:10 +00:00
statemachine Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev 2016-01-26 11:27:37 +00:00
thread Drop unnecessary dependencies from some tests 2017-01-10 16:34:52 +00:00
tools QStringMatcher: fix setCaseSensitivity() on a non-QString-backed matcher 2017-02-07 16:31:00 +00:00
xml tests/auto/corelib/xml: cleanup 2016-08-27 05:09:16 +00:00
corelib.pro Add support for Apple tvOS 2016-05-17 16:11:23 +00:00