aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickbuttongroup.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-11-10 11:42:25 +0100
committerFabian Kosmale <fabian.kosmale@qt.io>2020-11-11 10:23:34 +0000
commitb207f90c3074ef27b10c17cc719d83076bb3d78c (patch)
tree91b243a54999d420d3420a2a09987d7f017d0e28 /src/quicktemplates2/qquickbuttongroup.cpp
parent61aea033d081e372572fa96708bc501ebdec6e8a (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/qquickbuttongroup.cpp')
-rw-r--r--src/quicktemplates2/qquickbuttongroup.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/quicktemplates2/qquickbuttongroup.cpp b/src/quicktemplates2/qquickbuttongroup.cpp
index 974cd029c8..3788d7c0bb 100644
--- a/src/quicktemplates2/qquickbuttongroup.cpp
+++ b/src/quicktemplates2/qquickbuttongroup.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.
@@ -161,8 +161,8 @@ public:
void setCheckState(Qt::CheckState state);
static void buttons_append(QQmlListProperty<QQuickAbstractButton> *prop, QQuickAbstractButton *obj);
- static int buttons_count(QQmlListProperty<QQuickAbstractButton> *prop);
- static QQuickAbstractButton *buttons_at(QQmlListProperty<QQuickAbstractButton> *prop, int index);
+ static qsizetype buttons_count(QQmlListProperty<QQuickAbstractButton> *prop);
+ static QQuickAbstractButton *buttons_at(QQmlListProperty<QQuickAbstractButton> *prop, qsizetype index);
static void buttons_clear(QQmlListProperty<QQuickAbstractButton> *prop);
bool complete = true;
@@ -235,13 +235,13 @@ void QQuickButtonGroupPrivate::buttons_append(QQmlListProperty<QQuickAbstractBut
q->addButton(obj);
}
-int QQuickButtonGroupPrivate::buttons_count(QQmlListProperty<QQuickAbstractButton> *prop)
+qsizetype QQuickButtonGroupPrivate::buttons_count(QQmlListProperty<QQuickAbstractButton> *prop)
{
QQuickButtonGroupPrivate *p = static_cast<QQuickButtonGroupPrivate *>(prop->data);
return p->buttons.count();
}
-QQuickAbstractButton *QQuickButtonGroupPrivate::buttons_at(QQmlListProperty<QQuickAbstractButton> *prop, int index)
+QQuickAbstractButton *QQuickButtonGroupPrivate::buttons_at(QQmlListProperty<QQuickAbstractButton> *prop, qsizetype index)
{
QQuickButtonGroupPrivate *p = static_cast<QQuickButtonGroupPrivate *>(prop->data);
return p->buttons.value(index);