aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllistreference
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 /tests/auto/qml/qqmllistreference
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 'tests/auto/qml/qqmllistreference')
-rw-r--r--tests/auto/qml/qqmllistreference/tst_qqmllistreference.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/qml/qqmllistreference/tst_qqmllistreference.cpp b/tests/auto/qml/qqmllistreference/tst_qqmllistreference.cpp
index 665fcdc9dc..bf5ee92374 100644
--- a/tests/auto/qml/qqmllistreference/tst_qqmllistreference.cpp
+++ b/tests/auto/qml/qqmllistreference/tst_qqmllistreference.cpp
@@ -98,16 +98,16 @@ public:
static void append(QQmlListProperty<TestType> *p, TestType *v) {
reinterpret_cast<QList<TestType *> *>(p->data)->append(v);
}
- static int count(QQmlListProperty<TestType> *p) {
+ static qsizetype count(QQmlListProperty<TestType> *p) {
return reinterpret_cast<QList<TestType *> *>(p->data)->count();
}
- static TestType *at(QQmlListProperty<TestType> *p, int idx) {
+ static TestType *at(QQmlListProperty<TestType> *p, qsizetype idx) {
return reinterpret_cast<QList<TestType *> *>(p->data)->at(idx);
}
static void clear(QQmlListProperty<TestType> *p) {
return reinterpret_cast<QList<TestType *> *>(p->data)->clear();
}
- static void replace(QQmlListProperty<TestType> *p, int idx, TestType *v) {
+ static void replace(QQmlListProperty<TestType> *p, qsizetype idx, TestType *v) {
return reinterpret_cast<QList<TestType *> *>(p->data)->replace(idx, v);
}
static void removeLast(QQmlListProperty<TestType> *p) {