summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qdebug.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-08-17 17:58:42 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-08-21 08:28:59 +0200
commitbc2b8411c9e510a1101ed09b627317854c6e7d45 (patch)
tree930df431b4496ca8adc826f7df97058338dc0e70 /src/corelib/io/qdebug.h
parenta888239cf15fb18034122a06c687526c83dbdaa9 (diff)
QDebug: finish porting put{String,ByteArray} to qsizetype
The underlying QTextStream seems to support qsizetype-sized data and the private API of QDebug that is under consideration in this patch takes size_t, but, as so often, there're int/uint casts in-between that break things. Widen the int/uint casts to qsizetype/size_t, respectively. Pick-to: 6.4 6.3 6.2 Task-number: QTBUG-103525 Change-Id: I10bca093dc2d6f136871c94ca43f5b42fd1c8971 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/io/qdebug.h')
-rw-r--r--src/corelib/io/qdebug.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h
index 64b4ac37c9c..a730e2f7d1c 100644
--- a/src/corelib/io/qdebug.h
+++ b/src/corelib/io/qdebug.h
@@ -110,7 +110,7 @@ public:
inline QDebug &operator<<(double t) { stream->ts << t; return maybeSpace(); }
inline QDebug &operator<<(const char* t) { stream->ts << QString::fromUtf8(t); return maybeSpace(); }
inline QDebug &operator<<(const char16_t *t) { stream->ts << QStringView(t); return maybeSpace(); }
- inline QDebug &operator<<(const QString & t) { putString(t.constData(), uint(t.length())); return maybeSpace(); }
+ inline QDebug &operator<<(const QString & t) { putString(t.constData(), size_t(t.length())); return maybeSpace(); }
inline QDebug &operator<<(QStringView s) { putString(s.data(), size_t(s.size())); return maybeSpace(); }
inline QDebug &operator<<(QUtf8StringView s) { putByteArray(reinterpret_cast<const char*>(s.data()), s.size(), ContainsBinary); return maybeSpace(); }
inline QDebug &operator<<(QLatin1StringView t) { putByteArray(t.latin1(), t.size(), ContainsLatin1); return maybeSpace(); }