tst_QString: fix custom QCOMPARE for strings > 2Gi characters

Same fix as in tst_qbytearray's QCOMPARE() in
cb9715557c.

Pick-to: 6.4 6.2
Change-Id: I2222d9015ae7121a2fbcf5b936b27de20e873064
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2022-12-06 17:25:08 +01:00
parent 76cf4e67ab
commit 20d1477c14

View File

@ -637,7 +637,7 @@ QString verifyZeroTermination(const QString &str)
if (!strDataPtr->isMutable())
return str;
int strSize = str.size();
qsizetype strSize = str.size();
QChar strTerminator = str.constData()[strSize];
if (QChar('\0') != strTerminator)
return QString::fromLatin1(