diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-12-13 05:08:21 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-04-05 15:23:30 +0000 |
commit | 0683c9291f9c1ffe0625fdadee198840047f0e92 (patch) | |
tree | 9ae5a4ffb7f4b2630698b016f7d5f592f1f05fab /tests/auto/corelib/tools | |
parent | a7b04275082d065f392e7f18c54ea9b41507ae40 (diff) |
QChar: add missing relational operators against QLatin1String/QStringRef
For QChar <> QStringRef, equality and inequality were already provided
(via QChar -> QString implicit conversions, to be fixed in a separate
patch). Missing were the less/greater than (or equal) operators.
Added.
For QChar <> QLatin1String, all relational operators were missing.
Added, too.
[ChangeLog][QtCore][QChar] Added missing operator{<,>,<=,>=}
comparing against QLatin1String and QStringRef.
[ChangeLog][QtCore][QChar] Added missing operator{==,!=}
comparing against QLatin1String.
Change-Id: I9941fe7e7281ea560b3bd5970cb9651ffadc1495
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'tests/auto/corelib/tools')
-rw-r--r-- | tests/auto/corelib/tools/qstringapisymmetry/tst_qstringapisymmetry.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/tests/auto/corelib/tools/qstringapisymmetry/tst_qstringapisymmetry.cpp b/tests/auto/corelib/tools/qstringapisymmetry/tst_qstringapisymmetry.cpp index 1557bd6076..f0d7cb5698 100644 --- a/tests/auto/corelib/tools/qstringapisymmetry/tst_qstringapisymmetry.cpp +++ b/tests/auto/corelib/tools/qstringapisymmetry/tst_qstringapisymmetry.cpp @@ -44,28 +44,6 @@ template <typename T> QString toQString(const T &t) { return QString(t); } QString toQString(const QStringRef &ref) { return ref.toString(); } -// FIXME: these are missing at the time of writing, add them, then remove the dummies here: -#define MAKE_RELOP(op, A1, A2) \ - static bool operator op (const A1 &lhs, const A2 &rhs) \ - { return toQString(lhs) op toQString(rhs); } \ - /*end*/ -#define MAKE_LESS_ETC(A1, A2) \ - MAKE_RELOP(<, A1, A2) \ - MAKE_RELOP(>, A1, A2) \ - MAKE_RELOP(<=, A1, A2) \ - MAKE_RELOP(>=, A1, A2) \ - /*end*/ -MAKE_RELOP(==, QChar, QLatin1String) -MAKE_RELOP(!=, QChar, QLatin1String) -MAKE_LESS_ETC(QChar, QLatin1String) - -MAKE_LESS_ETC(QChar, QStringRef) -MAKE_LESS_ETC(QStringRef, QChar) - -#undef MAKE_LESS_ETC -#undef MAKE_RELOP -// END FIXME - class tst_QStringApiSymmetry : public QObject { Q_OBJECT |