aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlproperty.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-11-09 10:46:07 +0100
committerUlf Hermann <ulf.hermann@qt.io>2020-11-09 18:09:30 +0100
commitd7008c79d4ec023527ebfc118ad47f40075f244d (patch)
treece4e1b3e4148820fd5682ee1877a7626274cdb59 /src/qml/qml/qqmlproperty.cpp
parent5824283a7804e7975140c17731329786045ef432 (diff)
QQmlListProperty: Use qsizetype rather than int for sizes
[ChangeLog][QtQml] The QQmlListProperty callback functions use qsizetype now as type for the size of a list. This is in line with the containers that you might use to back the list. Fixes: QTBUG-88269 Change-Id: Ia38403cb32f241e6c70e1a580dbeff1d6d694331 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlproperty.cpp')
-rw-r--r--src/qml/qml/qqmlproperty.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp
index a30314635a..d53e751cb6 100644
--- a/src/qml/qml/qqmlproperty.cpp
+++ b/src/qml/qml/qqmlproperty.cpp
@@ -1339,7 +1339,7 @@ bool QQmlPropertyPrivate::write(
if (variantType == qMetaTypeId<QQmlListReference>()) {
QQmlListReference qdlr = value.value<QQmlListReference>();
- for (int ii = 0; ii < qdlr.count(); ++ii) {
+ for (qsizetype ii = 0; ii < qdlr.count(); ++ii) {
QObject *o = qdlr.at(ii);
if (o && !QQmlMetaObject::canConvert(o, listType))
o = nullptr;
@@ -1348,7 +1348,7 @@ bool QQmlPropertyPrivate::write(
} else if (variantType == qMetaTypeId<QList<QObject *> >()) {
const QList<QObject *> &list = qvariant_cast<QList<QObject *> >(value);
- for (int ii = 0; ii < list.count(); ++ii) {
+ for (qsizetype ii = 0; ii < list.count(); ++ii) {
QObject *o = list.at(ii);
if (o && !QQmlMetaObject::canConvert(o, listType))
o = nullptr;