QContiguousCache: fix streaming into QDebug when indices are > INT_MAX

As usual, int/qsizetype mismatch.

Task-number: QTBUG-103525
Change-Id: Ic5d9fb4fd42e4534ec0358ca7c4d79650c6ac919
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit db4480062796482da766a58f4812faf63d8acab0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Marc Mutz 2022-08-17 18:08:05 +02:00 committed by Qt Cherry-pick Bot
parent d7807ee3fa
commit 6ce5d0908d

View File

@ -292,7 +292,7 @@ inline QDebugIfHasDebugStream<T> 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 << ", ";