diff options
author | Marc Mutz <marc.mutz@qt.io> | 2024-03-19 08:00:27 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2024-03-21 09:34:51 +0000 |
commit | 76ffd8b08c90e953dc9e7a6a6006e6f50396822d (patch) | |
tree | 2fc1606fe9373697c05b55565e138317513fd4e3 | |
parent | f05798653b6c6254ab9a08de241fd28c189420a7 (diff) |
QSignalSpy: fix indexed loop (int instead of qsizetype)
While a signal with more than 2Gi arguments is only a theoretical
possibility, still use the correct index variable for the indexed loop
over this QList<int>.
Pick-to: 6.5
Change-Id: I2ed33238c2cd9d2d1c39cd29c988a2adfd821897
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit a90c3cc3c7ed24c83b9ffa4020cb3652678b36bf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 2ec659b1758c76502b1914baaeeb01beeaade4e4)
-rw-r--r-- | src/testlib/qsignalspy.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/testlib/qsignalspy.h b/src/testlib/qsignalspy.h index 117d485899..a60ae05e18 100644 --- a/src/testlib/qsignalspy.h +++ b/src/testlib/qsignalspy.h @@ -193,7 +193,7 @@ private: QMutexLocker locker(&m_mutex); QList<QVariant> list; list.reserve(args.size()); - for (int i = 0; i < args.size(); ++i) { + for (qsizetype i = 0; i < args.size(); ++i) { const QMetaType::Type type = static_cast<QMetaType::Type>(args.at(i)); if (type == QMetaType::QVariant) list << *reinterpret_cast<QVariant *>(a[i + 1]); |