summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2021-04-15 18:46:45 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2021-04-16 18:48:28 +0200
commitb9d0fd3a09c23b410bb8ef228ff5326d118f3069 (patch)
tree4f8733793ba71d3bfddbd1dd9bd9f0425685b06a
parentbf23fc3cdc29e5129482a871324b4a145b6c18ca (diff)
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>
-rw-r--r--tests/auto/corelib/serialization/qcborstreamwriter/tst_qcborstreamwriter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/corelib/serialization/qcborstreamwriter/tst_qcborstreamwriter.cpp b/tests/auto/corelib/serialization/qcborstreamwriter/tst_qcborstreamwriter.cpp
index cf717aaad5..b32a2b4d73 100644
--- a/tests/auto/corelib/serialization/qcborstreamwriter/tst_qcborstreamwriter.cpp
+++ b/tests/auto/corelib/serialization/qcborstreamwriter/tst_qcborstreamwriter.cpp
@@ -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;