tst_qcborstreamwriter: don't pass char8_t strings to QByteArray
There isn't a QByteArray constructor taking a char8_t*. (I am not sure if there should be one; QByteArray is not going to anything special about that information anyways.) Change such strings to be "ordinary" narrow string literals. There should be no problems at doing so, as by default we build in UTF-8 mode under all compilers. Pick-to: 6.1 6.0 Change-Id: Ia200ec6e3b0453bad033d5d8ff34c013bb27abd1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
bf23fc3cdc
commit
b9d0fd3a09
@ -193,7 +193,7 @@ void tst_QCborStreamWriter::nonAsciiStrings_data()
|
||||
QTest::addColumn<QString>("input");
|
||||
QTest::addColumn<bool>("isLatin1");
|
||||
|
||||
QByteArray latin1 = u8"Résumé";
|
||||
QByteArray latin1 = "Résumé";
|
||||
QTest::newRow("shortlatin1")
|
||||
<< ("\x68" + latin1) << QString::fromUtf8(latin1) << true;
|
||||
|
||||
@ -202,7 +202,7 @@ void tst_QCborStreamWriter::nonAsciiStrings_data()
|
||||
QTest::newRow("longlatin1")
|
||||
<< ("\x78\x28" + latin1) << QString::fromUtf8(latin1) << true;
|
||||
|
||||
QByteArray nonlatin1 = u8"Χαίρετε";
|
||||
QByteArray nonlatin1 = "Χαίρετε";
|
||||
QTest::newRow("shortnonlatin1")
|
||||
<< ("\x6e" + nonlatin1) << QString::fromUtf8(nonlatin1) << false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user