diff options
author | Marc Mutz <marc.mutz@qt.io> | 2023-06-28 08:27:42 +0200 |
---|---|---|
committer | Ahmad Samir <a.samirh78@gmail.com> | 2023-06-29 12:49:14 +0000 |
commit | 3bc3b8d69a291aa513d2d120c8ef46f968f1efdf (patch) | |
tree | ac3a295d09506f5738ffd9535fd1d452afb98503 | |
parent | 5654fbffd588fb3362faec49b2da2e669e02fa8a (diff) |
tst_QXmlStream: remove unneeded _ba UDLs
... and collapse adjacent C string literals.
Both QStringBuilder and non-QStringBuilder builds have no problem
resolving an operator+ for char[] and QByteArray, so there's no need
to turn the char[] into a QByteArray using the _ba UDL first.
It just causes pain because not all active branches support this UDL,
so remove, to bring this code in line with what the cherry-picks to
6.2 and 5.15 must needs had to use.
Amends 6326bec46a618c72feba4a2bb994c4d475050aed.
Pick-to: 6.6 6.5 6.5.2
Change-Id: Id3d61483729c51c82f58b826efcc8fc7960c3ccd
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
-rw-r--r-- | tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp b/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp index 46f8653fea..3a1b4511e8 100644 --- a/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp +++ b/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp @@ -1837,19 +1837,19 @@ void tst_QXmlStream::test_fastScanName_data() const // 4096 is the limit in QXmlStreamReaderPrivate::fastScanName() - QByteArray arr = "<a"_ba + ":" + QByteArray("b").repeated(4096 - 1); + QByteArray arr = "<a:" + QByteArray("b").repeated(4096 - 1); QTest::newRow("data1") << arr << QXmlStreamReader::PrematureEndOfDocumentError; - arr = "<a"_ba + ":" + QByteArray("b").repeated(4096); + arr = "<a:" + QByteArray("b").repeated(4096); QTest::newRow("data2") << arr << QXmlStreamReader::NotWellFormedError; - arr = "<"_ba + QByteArray("a").repeated(4000) + ":" + QByteArray("b").repeated(96); + arr = "<" + QByteArray("a").repeated(4000) + ":" + QByteArray("b").repeated(96); QTest::newRow("data3") << arr << QXmlStreamReader::PrematureEndOfDocumentError; - arr = "<"_ba + QByteArray("a").repeated(4000) + ":" + QByteArray("b").repeated(96 + 1); + arr = "<" + QByteArray("a").repeated(4000) + ":" + QByteArray("b").repeated(96 + 1); QTest::newRow("data4") << arr << QXmlStreamReader::NotWellFormedError; - arr = "<"_ba + QByteArray("a").repeated(4000 + 1) + ":" + QByteArray("b").repeated(96); + arr = "<" + QByteArray("a").repeated(4000 + 1) + ":" + QByteArray("b").repeated(96); QTest::newRow("data5") << arr << QXmlStreamReader::NotWellFormedError; } |