diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-10-11 16:21:42 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-10-11 16:21:42 +0200 |
commit | 6a0bb9a7d6a6473920da74bb48c52a4eaed990b0 (patch) | |
tree | 3a32c56b1fe21c96d5982511e0b4815c1c07dfbb /examples/qml/referenceexamples/grouped | |
parent | f0d23d3ff9da26a71295a6abd356c8d366d17439 (diff) | |
parent | 2746518c76e02c642ff29faf568de4de90216e58 (diff) |
Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
Change-Id: I4a91928610f79c8e21a05781953ffa41508c828a
Diffstat (limited to 'examples/qml/referenceexamples/grouped')
4 files changed, 7 insertions, 7 deletions
diff --git a/examples/qml/referenceexamples/grouped/birthdayparty.cpp b/examples/qml/referenceexamples/grouped/birthdayparty.cpp index e729c42bb5..1bae55076c 100644 --- a/examples/qml/referenceexamples/grouped/birthdayparty.cpp +++ b/examples/qml/referenceexamples/grouped/birthdayparty.cpp @@ -66,7 +66,7 @@ void BirthdayParty::setHost(Person *c) QQmlListProperty<Person> BirthdayParty::guests() { - return QQmlListProperty<Person>(this, m_guests); + return {this, m_guests}; } int BirthdayParty::guestCount() const diff --git a/examples/qml/referenceexamples/grouped/birthdayparty.h b/examples/qml/referenceexamples/grouped/birthdayparty.h index 7a9a03dabb..edaa11fa88 100644 --- a/examples/qml/referenceexamples/grouped/birthdayparty.h +++ b/examples/qml/referenceexamples/grouped/birthdayparty.h @@ -61,7 +61,7 @@ class BirthdayParty : public QObject Q_PROPERTY(QQmlListProperty<Person> guests READ guests) Q_CLASSINFO("DefaultProperty", "guests") public: - BirthdayParty(QObject *parent = 0); + BirthdayParty(QObject *parent = nullptr); Person *host() const; void setHost(Person *); diff --git a/examples/qml/referenceexamples/grouped/main.cpp b/examples/qml/referenceexamples/grouped/main.cpp index 17dcd09c34..14cd64fe68 100644 --- a/examples/qml/referenceexamples/grouped/main.cpp +++ b/examples/qml/referenceexamples/grouped/main.cpp @@ -66,7 +66,7 @@ int main(int argc, char ** argv) QQmlEngine engine; QQmlComponent component(&engine, QUrl("qrc:example.qml")); - BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create()); + auto *party = qobject_cast<BirthdayParty *>(component.create()); if (party && party->host()) { qWarning() << party->host()->name() << "is having a birthday!"; diff --git a/examples/qml/referenceexamples/grouped/person.h b/examples/qml/referenceexamples/grouped/person.h index b4e6a894cd..6f6caaee7c 100644 --- a/examples/qml/referenceexamples/grouped/person.h +++ b/examples/qml/referenceexamples/grouped/person.h @@ -61,7 +61,7 @@ class ShoeDescription : public QObject Q_PROPERTY(QString brand READ brand WRITE setBrand) Q_PROPERTY(qreal price READ price WRITE setPrice) public: - ShoeDescription(QObject *parent = 0); + ShoeDescription(QObject *parent = nullptr); int size() const; void setSize(int); @@ -89,7 +89,7 @@ class Person : public QObject Q_PROPERTY(ShoeDescription *shoe READ shoe) // ![1] public: - Person(QObject *parent = 0); + Person(QObject *parent = nullptr); QString name() const; void setName(const QString &); @@ -104,14 +104,14 @@ class Boy : public Person { Q_OBJECT public: - Boy(QObject * parent = 0); + Boy(QObject * parent = nullptr); }; class Girl : public Person { Q_OBJECT public: - Girl(QObject * parent = 0); + Girl(QObject * parent = nullptr); }; #endif // PERSON_H |