From db4480062796482da766a58f4812faf63d8acab0 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 17 Aug 2022 18:08:05 +0200 Subject: [PATCH] QContiguousCache: fix streaming into QDebug when indices are > INT_MAX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As usual, int/qsizetype mismatch. Pick-to: 6.4 6.3 6.2 Task-number: QTBUG-103525 Change-Id: Ic5d9fb4fd42e4534ec0358ca7c4d79650c6ac919 Reviewed-by: MÃ¥rten Nordheim --- src/corelib/io/qdebug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h index a730e2f7d1c..3cd8384e3d4 100644 --- a/src/corelib/io/qdebug.h +++ b/src/corelib/io/qdebug.h @@ -302,7 +302,7 @@ inline QDebugIfHasDebugStream operator<<(QDebug debug, const QContiguousCache { const QDebugStateSaver saver(debug); debug.nospace() << "QContiguousCache("; - for (int i = cache.firstIndex(); i <= cache.lastIndex(); ++i) { + for (qsizetype i = cache.firstIndex(); i <= cache.lastIndex(); ++i) { debug << cache[i]; if (i != cache.lastIndex()) debug << ", ";