diff options
Diffstat (limited to 'examples/qml/referenceexamples/attached')
4 files changed, 6 insertions, 6 deletions
diff --git a/examples/qml/referenceexamples/attached/birthdayparty.cpp b/examples/qml/referenceexamples/attached/birthdayparty.cpp index 26aa56e86c..da0cb800fc 100644 --- a/examples/qml/referenceexamples/attached/birthdayparty.cpp +++ b/examples/qml/referenceexamples/attached/birthdayparty.cpp @@ -81,7 +81,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/attached/birthdayparty.h b/examples/qml/referenceexamples/attached/birthdayparty.h index 0684f16255..15375f14d9 100644 --- a/examples/qml/referenceexamples/attached/birthdayparty.h +++ b/examples/qml/referenceexamples/attached/birthdayparty.h @@ -76,7 +76,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/attached/main.cpp b/examples/qml/referenceexamples/attached/main.cpp index f07f16ae0f..581b033dfc 100644 --- a/examples/qml/referenceexamples/attached/main.cpp +++ b/examples/qml/referenceexamples/attached/main.cpp @@ -67,7 +67,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/attached/person.h b/examples/qml/referenceexamples/attached/person.h index 9b63773d49..2398da38bf 100644 --- a/examples/qml/referenceexamples/attached/person.h +++ b/examples/qml/referenceexamples/attached/person.h @@ -87,7 +87,7 @@ class Person : public QObject Q_PROPERTY(QString name READ name WRITE setName) Q_PROPERTY(ShoeDescription *shoe READ shoe) public: - Person(QObject *parent = 0); + Person(QObject *parent = nullptr); QString name() const; void setName(const QString &); @@ -102,14 +102,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 |