Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.10.0
-
None
-
Qt 5.10.0, Win32
-
ea6675374fa6e94bd4cf10613c85cee2c724bcdc
Description
We discovered that QString::compare handles null and empty strings differently:
QString nullString; QString otherData("Some text"); int nResult1 = nullString.compare(otherData, Qt::CaseInsensitive); QString emptyString(""); int nResult2 = emptyString.compare(otherData, Qt::CaseInsensitive);
With Qt 5.10 nResult1 equals 9 and nResult2 equals -1. In previous versions, e.g. 5.7, both results were equal -1;