qt6-bb10/tests/auto/corelib/tools
Marc Mutz e0ea0f6178 QChar: optimize comparison with QString{,Ref}
Instead of relying on the QString relational operators to
implicitly convert the QChar to a QString, add relational
operator overloads that compare the QChar without first
turning it into a QString, saving one memory allocation
per comparison, and allowing to mark the operation as
nothrow.

Consequently, in tst_QStringBinOps, verify now that all
relational operations are noexcept.

The added overloads make QChar ==/!= int comparisons
ambiguous. De-ambiguate by providing a constrained
template that matches int and nothing but int (otherwise,
the QChar and the int versions would compete for a
QChar::SpecialCharacter argument, and end up creating
new ambiguities). This solution may not be perfect, but
it can be easily extended should more ambiguities crop up.
The existing overload deals with all patterns found in
qtbase.

Change-Id: I4156d918e9b9134c1da684b8b69e0ee526ad24e3
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-05 19:47:37 +00:00
..
collections Updated license headers 2016-01-21 18:55:18 +00:00
qalgorithms Updated license headers 2016-01-21 18:55:18 +00:00
qarraydata Updated license headers 2016-01-21 18:55:18 +00:00
qarraydata_strictiterators
qbitarray Updated license headers 2016-01-21 18:55:18 +00:00
qbytearray Merge remote-tracking branch 'origin/5.7' into dev 2016-04-05 14:22:45 +02:00
qbytearraylist Updated license headers 2016-01-21 18:55:18 +00:00
qbytearraymatcher Updated license headers 2016-01-21 18:55:18 +00:00
qbytedatabuffer Updated license headers 2016-01-21 18:55:18 +00:00
qcache Updated license headers 2016-01-21 18:55:18 +00:00
qchar Merge remote-tracking branch 'origin/5.7' into dev 2016-04-05 14:22:45 +02:00
qcollator Remove the traces of the discontinued android-no-sdk platform 2016-03-30 10:12:34 +00:00
qcommandlineparser Merge remote-tracking branch 'origin/5.7' into dev 2016-04-05 14:22:45 +02:00
qcontiguouscache Updated license headers 2016-01-21 18:55:18 +00:00
qcryptographichash Remove the traces of the discontinued android-no-sdk platform 2016-03-30 10:12:34 +00:00
qdate Add Intel copyright to files that Intel has had non-trivial contribution 2016-01-21 22:44:21 +00:00
qdatetime QtCore: Remove Windows CE. 2016-03-30 11:22:47 +00:00
qeasingcurve Updated license headers 2016-01-21 18:55:18 +00:00
qelapsedtimer Updated license headers 2016-01-21 18:55:18 +00:00
qexplicitlyshareddatapointer Updated license headers 2016-01-21 18:55:18 +00:00
qfreelist Updated license headers 2016-01-21 18:55:18 +00:00
qhash QtCore: Remove Windows CE. 2016-03-30 11:22:47 +00:00
qhash_strictiterators
qhashfunctions Updated license headers 2016-01-21 18:55:18 +00:00
qlatin1string QLatin1String: add at()/op[]/mid()/right()/left() 2016-02-19 18:16:38 +00:00
qline Remove inclusion of -lm for INTEGRITY. 2016-03-18 20:40:59 +00:00
qlinkedlist Updated license headers 2016-01-21 18:55:18 +00:00
qlist Updated license headers 2016-01-21 18:55:18 +00:00
qlist_strictiterators
qlocale QtCore: Remove Windows CE. 2016-03-30 11:22:47 +00:00
qmap Updated license headers 2016-01-21 18:55:18 +00:00
qmap_strictiterators
qmargins Updated license headers 2016-01-21 18:55:18 +00:00
qmessageauthenticationcode Updated license headers 2016-01-21 18:55:18 +00:00
qpair Updated license headers 2016-01-21 18:55:18 +00:00
qpoint Updated license headers 2016-01-21 18:55:18 +00:00
qpointf Updated license headers 2016-01-21 18:55:18 +00:00
qqueue Updated license headers 2016-01-21 18:55:18 +00:00
qrect Merge remote-tracking branch 'origin/5.6' into 5.7 2016-03-21 09:02:57 +01:00
qregexp QtCore: Remove Windows CE. 2016-03-30 11:22:47 +00:00
qregularexpression Updated license headers 2016-01-21 18:55:18 +00:00
qringbuffer Updated license headers 2016-01-21 18:55:18 +00:00
qscopedpointer Updated license headers 2016-01-21 18:55:18 +00:00
qscopedvaluerollback Updated license headers 2016-01-21 18:55:18 +00:00
qset Updated license headers 2016-01-21 18:55:18 +00:00
qsharedpointer QtCore: Remove Windows CE. 2016-03-30 11:22:47 +00:00
qsize Updated license headers 2016-01-21 18:55:18 +00:00
qsizef Updated license headers 2016-01-21 18:55:18 +00:00
qstl Updated license headers 2016-01-21 18:55:18 +00:00
qstring QtCore: Remove Windows CE. 2016-03-30 11:22:47 +00:00
qstring_no_cast_from_bytearray Updated license headers 2016-01-21 18:55:18 +00:00
qstringapisymmetry QChar: optimize comparison with QString{,Ref} 2016-04-05 19:47:37 +00:00
qstringbuilder Updated license headers 2016-01-21 18:55:18 +00:00
qstringiterator Updated license headers 2016-01-21 18:55:18 +00:00
qstringlist QtCore: Remove Windows CE. 2016-03-30 11:22:47 +00:00
qstringmatcher Updated license headers 2016-01-21 18:55:18 +00:00
qstringref QStringRef: add missing op[] 2016-01-26 11:21:09 +00:00
qtextboundaryfinder Remove the traces of the discontinued android-no-sdk platform 2016-03-30 10:12:34 +00:00
qtime Updated license headers 2016-01-21 18:55:18 +00:00
qtimeline QtCore: Remove Windows CE. 2016-03-30 11:22:47 +00:00
qtimezone Merge remote-tracking branch 'origin/5.7' into dev 2016-03-22 07:28:42 +01:00
qvarlengtharray Updated license headers 2016-01-21 18:55:18 +00:00
qvector QVector: preserve capacity in clear() 2016-02-29 07:57:47 +00:00
qvector_strictiterators
qversionnumber Updated license headers 2016-01-21 18:55:18 +00:00
tools.pro Add test for API symmetry of QString/Ref, QLatin1String, QChar 2016-03-15 08:11:35 +00:00