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)
This commit is contained in:
parent
f05798653b
commit
76ffd8b08c
@ -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]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user