From 77bec4f7c837cba16fc746ada9de370ae0b23922 Mon Sep 17 00:00:00 2001 From: Ivan Solovev Date: Thu, 15 Feb 2024 15:10:56 +0100 Subject: 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 --- tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp') 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) -- cgit v1.2.3