aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript
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/qqmlecmascript
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/qqmlecmascript')
-rw-r--r--tests/auto/qml/qqmlecmascript/testtypes.cpp4
-rw-r--r--tests/auto/qml/qqmlecmascript/testtypes.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/qml/qqmlecmascript/testtypes.cpp b/tests/auto/qml/qqmlecmascript/testtypes.cpp
index ec7ae1e9a5..688ed2c946 100644
--- a/tests/auto/qml/qqmlecmascript/testtypes.cpp
+++ b/tests/auto/qml/qqmlecmascript/testtypes.cpp
@@ -424,12 +424,12 @@ void QObjectContainer::children_append(QQmlListProperty<QObject> *prop, QObject
}
}
-int QObjectContainer::children_count(QQmlListProperty<QObject> *prop)
+qsizetype QObjectContainer::children_count(QQmlListProperty<QObject> *prop)
{
return static_cast<QObjectContainer*>(prop->object)->dataChildren.count();
}
-QObject *QObjectContainer::children_at(QQmlListProperty<QObject> *prop, int index)
+QObject *QObjectContainer::children_at(QQmlListProperty<QObject> *prop, qsizetype index)
{
return static_cast<QObjectContainer*>(prop->object)->dataChildren.at(index);
}
diff --git a/tests/auto/qml/qqmlecmascript/testtypes.h b/tests/auto/qml/qqmlecmascript/testtypes.h
index 878dd79466..159038f851 100644
--- a/tests/auto/qml/qqmlecmascript/testtypes.h
+++ b/tests/auto/qml/qqmlecmascript/testtypes.h
@@ -1687,8 +1687,8 @@ public:
QQmlListProperty<QObject> data();
static void children_append(QQmlListProperty<QObject> *prop, QObject *o);
- static int children_count(QQmlListProperty<QObject> *prop);
- static QObject *children_at(QQmlListProperty<QObject> *prop, int index);
+ static qsizetype children_count(QQmlListProperty<QObject> *prop);
+ static QObject *children_at(QQmlListProperty<QObject> *prop, qsizetype index);
static void children_clear(QQmlListProperty<QObject> *prop);
QList<QObject*> dataChildren;