diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-11-09 10:46:07 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-11-09 18:09:30 +0100 |
commit | d7008c79d4ec023527ebfc118ad47f40075f244d (patch) | |
tree | ce4e1b3e4148820fd5682ee1877a7626274cdb59 /src/qml/qml/qqmlvmemetaobject.cpp | |
parent | 5824283a7804e7975140c17731329786045ef432 (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/qqmlvmemetaobject.cpp')
-rw-r--r-- | src/qml/qml/qqmlvmemetaobject.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index 6919c6dba3..2379f393aa 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -131,12 +131,12 @@ static void list_append(QQmlListProperty<QObject> *prop, QObject *o) resolved.activateSignal(); } -static int list_count(QQmlListProperty<QObject> *prop) +static qsizetype list_count(QQmlListProperty<QObject> *prop) { return ResolvedList(prop).list()->count(); } -static QObject *list_at(QQmlListProperty<QObject> *prop, int index) +static QObject *list_at(QQmlListProperty<QObject> *prop, qsizetype index) { return ResolvedList(prop).list()->at(index); } @@ -148,7 +148,7 @@ static void list_clear(QQmlListProperty<QObject> *prop) resolved.activateSignal(); } -static void list_replace(QQmlListProperty<QObject> *prop, int index, QObject *o) +static void list_replace(QQmlListProperty<QObject> *prop, qsizetype index, QObject *o) { const ResolvedList resolved(prop); resolved.list()->replace(index, o); |