QContiguousCache: fix streaming into QDebug when indices are > INT_MAX

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 <marten.nordheim@qt.io>
This commit is contained in:
Marc Mutz 2022-08-17 18:08:05 +02:00
parent bc2b8411c9
commit db44800627

View File

@ -302,7 +302,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 << ", ";