summaryrefslogtreecommitdiffstats
path: root/tests/manual/qopenglwindow/multiwindow
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2025-11-27 20:06:25 +0100
committerMarc Mutz <marc.mutz@qt.io>2025-11-28 23:33:09 +0000
commitfa851e768872c08c177db019931a2df0b8f74c65 (patch)
tree77da6518fe62f36f2f5b0694ddfcc9c9c2b0ff7e /tests/manual/qopenglwindow/multiwindow
parentce4969e404c493727831a626087cfbe331783701 (diff)
QFont: fix a QT_ASCII_CAST_WARNHEADdev
Says GCC: qfont.cpp:2202:81: required from here 2202 | fontDescription += comma + tag.toString() + u'=' + QString::number(value); | ^ qstringbuilder.h:403:37: warning: ‘static void QConcatenable<QByteArray>::appendTo(const QByteArray&, QChar*&)’ is deprecated: Use fromUtf8, QStringLiteral, or QLatin1StringView [-Wdeprecated-declarations] 403 | QConcatenableEx<B>::appendTo(p.b, out); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ qstringbuilder.h:372:43: note: declared here 372 | QT_ASCII_CAST_WARN static inline void appendTo(const QByteArray &ba, QChar *&out) | ^~~~~~~~ This is because Tag::toString() returns QByteArray, not QString. To fix, wrap the toString() result in QLatin1StringView. This is safe, because the temporary QByteArray will be kept alive until the end of the full-expression, so until after op+= has executed. It does change the serialization vis-a-vis the old code, but a) only for non-US-ASCII tags, which are not really valid, and b) we make it more robust now, because each random 4-octet sequence is a valid L1 string, but many are not valid UTF-8, so their interpretation as U8 by the old code (QByteArray → QString assumes U8) depends on behavior of Qt outside its spec. GIGO applies, of course, but we don't tend to specify the GO for any given GI, so it's better to use an algorithm for which no input is "garbage". Amends 8fe6ad3eed40a8c851bf5d49e322f9794b9f7dcf. Task-number: QTBUG-141412 Change-Id: Ic45f9147ca54201a33d953da57b768d2a5d115e4 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Diffstat (limited to 'tests/manual/qopenglwindow/multiwindow')
0 files changed, 0 insertions, 0 deletions