diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-11-10 11:42:25 +0100 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-11-11 10:23:34 +0000 |
commit | b207f90c3074ef27b10c17cc719d83076bb3d78c (patch) | |
tree | 91b243a54999d420d3420a2a09987d7f017d0e28 /src/quicktemplates2/qquickcontainer.cpp | |
parent | 61aea033d081e372572fa96708bc501ebdec6e8a (diff) |
Follow up on change of QQmlListProperty to qsizetype
This deals with d7008c79d4ec023527ebfc118ad47f40075f244d in
qtdeclarative which aligned QQmlListProperty with our container types.
Note: not changing the respective APIs of the QQuick classes
in this change. Ie. QQuickPlatformMenu::insertItem still operates on
int as index, and QQuickMenuPrivate still stores currentIndex as int.
This might need to be addressed in a follow-up commit.
Fixes: QTBUG-88362
Change-Id: Ia663cfa47fa91c55997cdef288b2a866107a5f25
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickcontainer.cpp')
-rw-r--r-- | src/quicktemplates2/qquickcontainer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/quicktemplates2/qquickcontainer.cpp b/src/quicktemplates2/qquickcontainer.cpp index 505ac321..3148bdee 100644 --- a/src/quicktemplates2/qquickcontainer.cpp +++ b/src/quicktemplates2/qquickcontainer.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the Qt Quick Templates 2 module of the Qt Toolkit. @@ -391,13 +391,13 @@ void QQuickContainerPrivate::contentData_append(QQmlListProperty<QObject> *prop, } } -int QQuickContainerPrivate::contentData_count(QQmlListProperty<QObject> *prop) +qsizetype QQuickContainerPrivate::contentData_count(QQmlListProperty<QObject> *prop) { QQuickContainer *q = static_cast<QQuickContainer *>(prop->object); return QQuickContainerPrivate::get(q)->contentData.count(); } -QObject *QQuickContainerPrivate::contentData_at(QQmlListProperty<QObject> *prop, int index) +QObject *QQuickContainerPrivate::contentData_at(QQmlListProperty<QObject> *prop, qsizetype index) { QQuickContainer *q = static_cast<QQuickContainer *>(prop->object); return QQuickContainerPrivate::get(q)->contentData.value(index); @@ -415,13 +415,13 @@ void QQuickContainerPrivate::contentChildren_append(QQmlListProperty<QQuickItem> q->addItem(item); } -int QQuickContainerPrivate::contentChildren_count(QQmlListProperty<QQuickItem> *prop) +qsizetype QQuickContainerPrivate::contentChildren_count(QQmlListProperty<QQuickItem> *prop) { QQuickContainer *q = static_cast<QQuickContainer *>(prop->object); return QQuickContainerPrivate::get(q)->contentModel->count(); } -QQuickItem *QQuickContainerPrivate::contentChildren_at(QQmlListProperty<QQuickItem> *prop, int index) +QQuickItem *QQuickContainerPrivate::contentChildren_at(QQmlListProperty<QQuickItem> *prop, qsizetype index) { QQuickContainer *q = static_cast<QQuickContainer *>(prop->object); return q->itemAt(index); |