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 12:36:39 +0100
committerIvan Solovev <ivan.solovev@qt.io>2024-02-20 01:04:33 +0100
commitfb50ab700600cbcdf21e5d06321f357eae4303bb (patch)
treec2d5a9a25513c554d63c5f1c1bfcd4704136d921 /tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp
parent1f92ff3ee08259d56209191cff24983b5969d50c (diff)
Add QByteArrayView vs const char * relational operators
... by using the new comparison helper macros. Also, convert the existing QByteArrayView relational operators to use these macros. An attempt to define the helper functions comparesEqual() and compareThreeWay() as hidden friends leads to compilation errors, because the QByteArrayView(QLatin1StringView) constructor gets somehow disabled. Apparently, it cannot satisfy the QtPrivate::IsContainerCompatibleWithQByteArrayView trait anymore. I could not find a reason for that, so I just defined the helper functions as static inline private members of QByteArrayView. This fixes the issue. This allows to enable related tests in tst_qstringapisymmetry. Task-number: QTBUG-108805 Change-Id: I35a69e99db8c61531ec726dab5b242b857f69e85 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.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp b/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp
index 635b9cfa52..e1a2232b7b 100644
--- a/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp
+++ b/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp
@@ -320,10 +320,8 @@ private Q_SLOTS:
void compare_QByteArrayView_QByteArray() { compare_impl<QByteArrayView, QByteArray>(); }
void compare_QByteArrayView_QByteArrayView_data() { compare_data(); }
void compare_QByteArrayView_QByteArrayView() { compare_impl<QByteArrayView, QByteArrayView>(); }
-#ifdef AMBIGUOUS_CALL
void compare_QByteArrayView_const_char_star_data() { compare_data(); }
void compare_QByteArrayView_const_char_star() { compare_impl<QByteArrayView, const char *>(); }
-#endif
void compare_const_char_star_QChar_data() { compare_data(false); }
void compare_const_char_star_QChar() { compare_impl<const char *, QChar>(); }
@@ -337,10 +335,8 @@ private Q_SLOTS:
void compare_const_char_star_QLatin1String() { compare_impl<const char *, QLatin1String>(); }
void compare_const_char_star_QByteArray_data() { compare_data(); }
void compare_const_char_star_QByteArray() { compare_impl<const char *, QByteArray>(); }
-#ifdef AMBIGUOUS_CALL
void compare_const_char_star_QByteArrayView_data() { compare_data(); }
void compare_const_char_star_QByteArrayView() { compare_impl<const char *, QByteArrayView>(); }
-#endif
//void compare_const_char_star_const_char_star_data() { compare_data(); }
//void compare_const_char_star_const_char_star() { compare_impl<const char *, const char *>(); }