qt5base-lts/tests/auto/corelib
Marc Mutz a5febadac5 QString(Ref): make toLatin1()/toLocal8Bit() null handling consistent
Systematic testing in tst_QStringApiSymmetry revealed a bug in
QStringRef::toLatin1(): a null input did not result in a null output,
but an empty one. This is fixed, for consistency with
QString::toLatin1(), and QString(Ref)::toUtf8(), which behaved
correctly already.

The same bug was found in QString(Ref)::toLocal8Bit(), which is
particularly hideous, as it's documented to fall back to toLatin1(),
which preserves null inputs. Fixed, too.

[ChangeLog][QtCore][QString] toLocal8Bit() now preserves nullness of
the input QString (outputs null QByteArray).

[ChangeLog][QtCore][QStringRef] toLocal8Bit() and toLatin1() now
preserve nullness of the input QStringRef (output null QByteArrays).

Change-Id: I7026211922c287e03d07e89edbad2987aa646e51
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-02-15 20:12:36 +00:00
..
animation Merge remote-tracking branch 'origin/5.8' into dev 2017-01-30 12:46:20 +01:00
codecs tst_utf8: remove duplicate nonCharacters() data 2017-01-10 18:39:31 +00:00
global New qfloat16 class 2017-01-31 14:21:42 +00:00
io Merge remote-tracking branch 'origin/5.8' into 5.9 2017-02-08 15:49:18 +01: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.8' into dev 2016-11-17 14:43:26 +01:00
kernel Merge remote-tracking branch 'origin/5.8' into 5.9 2017-02-14 11:33:02 +01:00
mimetypes tests/auto/corelib/mimetypes: use local QThreadPool 2016-09-17 06:47:05 +00:00
plugin Merge remote-tracking branch 'origin/5.8' into 5.9 2017-02-14 11:33:02 +01: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 Merge remote-tracking branch 'origin/5.8' into 5.9 2017-02-14 11:33:02 +01:00
tools QString(Ref): make toLatin1()/toLocal8Bit() null handling consistent 2017-02-15 20:12:36 +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