In the presence of multiple overloads of a function taking either QString or QStringView, QStringView should always be preferred. The rationale is that the QStringView overload may have been added "later" (read: the function was written when QStringView was not available yet, so it took QString), and the fact that a function with the _same name_ offers a QStringView overload implies the function never needed to store/own the string in the first place. Add a (compile-time) test for this preference. This is in preparation for a future QString(char16_t*) constructor (in Qt 5.15 / Qt 6). Change-Id: I60a435e494b653548f8f8d52c5d7e7cac2cc875a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> |
||
|---|---|---|
| .. | ||
| qbytearray | ||
| qbytearraylist | ||
| qbytearraymatcher | ||
| qbytedatabuffer | ||
| qchar | ||
| qcollator | ||
| qlatin1string | ||
| qlocale | ||
| qregexp | ||
| qregularexpression | ||
| qstring | ||
| qstring_no_cast_from_bytearray | ||
| qstringapisymmetry | ||
| qstringbuilder | ||
| qstringiterator | ||
| qstringlist | ||
| qstringmatcher | ||
| qstringref | ||
| qstringview | ||
| qtextboundaryfinder | ||
| text.pro | ||