qt5base-lts/tests/auto/corelib/tools/qstring
Marc Mutz 009f1f2812 QString: fix regression comparing null QString with null const char *
Commit 4a40c717f3 optimized
QString::compare_helper(QChar*, int, char*, int), but got
the case wrong where the rhs is null, but the lhs is empty,
not null (which is the case even with a null QString, as
QString().constData() != nullptr). The correct result in
this case is 0, since in Qt empty and null strings compare
equal.

Fix by checking the length of lhs, not its pointer.

Task-number: QTBUG-55154
Change-Id: I3ec2cd25d9bdca90cf3f5568a875b1e52c779979
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-08-05 18:52:16 +00:00
..
.gitignore Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
double_data.h Updated license headers 2016-01-21 18:55:18 +00:00
qstring.pro Replace qdtoa and qstrtod implementation by a 3rdparty library 2015-11-02 17:00:50 +00:00
tst_qstring_mac.mm Updated license headers 2016-01-21 18:55:18 +00:00
tst_qstring.cpp QString: fix regression comparing null QString with null const char * 2016-08-05 18:52:16 +00:00