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 /examples/qml/referenceexamples/properties/birthdayparty.h | |
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 'examples/qml/referenceexamples/properties/birthdayparty.h')
-rw-r--r-- | examples/qml/referenceexamples/properties/birthdayparty.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/qml/referenceexamples/properties/birthdayparty.h b/examples/qml/referenceexamples/properties/birthdayparty.h index 9da5158de2..7e1668add3 100644 --- a/examples/qml/referenceexamples/properties/birthdayparty.h +++ b/examples/qml/referenceexamples/properties/birthdayparty.h @@ -76,18 +76,18 @@ public: QQmlListProperty<Person> guests(); void appendGuest(Person*); - int guestCount() const; - Person *guest(int) const; + qsizetype guestCount() const; + Person *guest(qsizetype) const; void clearGuests(); - void replaceGuest(int, Person*); + void replaceGuest(qsizetype, Person*); void removeLastGuest(); private: static void appendGuest(QQmlListProperty<Person>*, Person*); - static int guestCount(QQmlListProperty<Person>*); - static Person* guest(QQmlListProperty<Person>*, int); + static qsizetype guestCount(QQmlListProperty<Person>*); + static Person* guest(QQmlListProperty<Person>*, qsizetype); static void clearGuests(QQmlListProperty<Person>*); - static void replaceGuest(QQmlListProperty<Person>*, int, Person*); + static void replaceGuest(QQmlListProperty<Person>*, qsizetype, Person*); static void removeLastGuest(QQmlListProperty<Person>*); Person *m_host; |