summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2024-02-15 15:10:56 +0100
committerIvan Solovev <ivan.solovev@qt.io>2024-02-20 01:04:34 +0100
commit77bec4f7c837cba16fc746ada9de370ae0b23922 (patch)
treed2d1a61bf7846ca16a12b11cb69e0a836a50a841 /tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp
parent4832426d1b22099cbdacaede17a4fd50336b9ae3 (diff)
Simplify QLatin1StringView vs byte array relational operators
Now when QLatin1StringView implements relational operators with QByteArrayView in terms of new comparison helper macros and helper methods taking QByteArrayView, we can easily re-use these helper methods to provide comparison with QByteArray and const char *. QLatin1StringView already provided almost all of these operations, partly as hidden friend functions, partly as inline methods. Since the class is not exported, and the methods were inline, we can just remove all of them and replace them with the comparison helper macros. This should speed up the relational operators, because they do not construct string objects using QString::fromUtf8() anymore, but use QUtf8StringView instead. This also adds the previously missing QByteArray vs QLatin1StringView relational operators. Task-number: QTBUG-117661 Change-Id: I17a9185127ae130dab9409c6340a58f5d39f5a10 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp')
-rw-r--r--tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp b/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp
index 7d74253407..927af3a47e 100644
--- a/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp
+++ b/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp
@@ -61,7 +61,6 @@ constexpr bool is_fake_comparator_v = false;
/*end*/
MAKE_ALL(QByteArray, QChar)
-MAKE_ALL(QByteArray, QLatin1String)
MAKE_ALL(QByteArray, char16_t)
MAKE_ALL(char16_t, QByteArray)