qt6-bb10/tests/auto/corelib/tools/qstring
Anton Kudryavtsev 9c8a8e90a6 QString: fix append(const QStringRef &str)
Use QStringRef::isNull instead of QStringRef::string()
for validation. Non-NULL str.string() may yet leave us
with a useless str.unicode(), which is the actual problem here;
whereas !str.isNull() does really confirm that str.unicode()
is sensible.

Such test prevents situation like:

const QString a;
QString b;
b.append(a); // b.isNull() == true
b.append(QStringRef(&a)); // b.isNull() == false

Auto test updated: create QStringRef from QString directly, without
any condition.

Change-Id: I082cd58ef656d8a53e3c1223aca01feea82fffb9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-08-04 19:55:04 +00:00
..
.gitignore
double_data.h Update copyright headers 2015-02-11 06:49:51 +00:00
qstring.pro Add conversion functions for C++11 u16string and u32string 2015-01-24 11:50:13 +01:00
tst_qstring.cpp QString: fix append(const QStringRef &str) 2016-08-04 19:55:04 +00:00
tst_qstring_mac.mm Add shared implementation of a NSAutoreleasePool wrapper to qglobal 2015-05-27 18:45:29 +00:00