diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2025-02-07 10:43:42 +0100 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2025-02-10 20:16:50 +0100 |
| commit | f31c37a1312fc4e21a58906e2b883099629fb9e1 (patch) | |
| tree | 82e9e4b6265134598d0be43c4697ada1a75a8986 /src/tools/uic/cpp/cppwriteinitialization.cpp | |
| parent | eda83d41f6dbc00403447a9b6b6ed730e6706554 (diff) | |
tst_QAnyStringView: test which chars magically convert
QAnyStringView is designed to replace overload sets containing QString
and QChar, among others, so it needs to accept types that merely
implicitly convert to QString and QChar. It achieves this by
maintaining a hidden container to hold the converted QString or QChar
for the duration of the full-expression, much like the compiler would
do if the function took QString/QChar.
This patch adds a check for the single-char ctors to determine whether
they convert or not, by comparing QASV::data() to the address of the
QASV's argument. While it would be interesting to have the same test
for QString, that is outside the scope of this patch.
Task-number: QTBUG-126054
Pick-to: 6.9 6.8 6.5 6.2
Change-Id: I30ac2d1199da5a03fe6fee4c9d5ea2a209a003d6
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Diffstat (limited to 'src/tools/uic/cpp/cppwriteinitialization.cpp')
0 files changed, 0 insertions, 0 deletions
