diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-08-19 11:01:17 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-08-20 08:42:30 +0200 |
commit | 3cc226ffe74a45509746dddb4e72457f1651be56 (patch) | |
tree | 3ba6f8918ee0181564743897a28484bf358823ed /examples/qml/referenceexamples | |
parent | 66fabff2530f2080c07bcf89a47474daea4c7c38 (diff) |
Reference Examples: Use nullptr
Change-Id: I325cfdcf488e9d238e618ca23ef40aedf7c5eec1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'examples/qml/referenceexamples')
21 files changed, 39 insertions, 39 deletions
diff --git a/examples/qml/referenceexamples/adding/person.h b/examples/qml/referenceexamples/adding/person.h index 44e2ac3b1b..f40c8d8086 100644 --- a/examples/qml/referenceexamples/adding/person.h +++ b/examples/qml/referenceexamples/adding/person.h @@ -58,7 +58,7 @@ class Person : public QObject Q_PROPERTY(QString name READ name WRITE setName) Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize) public: - Person(QObject *parent = 0); + Person(QObject *parent = nullptr); QString name() const; void setName(const QString &); 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/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 diff --git a/examples/qml/referenceexamples/binding/birthdayparty.h b/examples/qml/referenceexamples/binding/birthdayparty.h index 93dad927d7..15e1908ece 100644 --- a/examples/qml/referenceexamples/binding/birthdayparty.h +++ b/examples/qml/referenceexamples/binding/birthdayparty.h @@ -83,7 +83,7 @@ class BirthdayParty : public QObject Q_PROPERTY(QString announcement READ announcement WRITE setAnnouncement) 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/binding/happybirthdaysong.h b/examples/qml/referenceexamples/binding/happybirthdaysong.h index ab264b80c7..6960c7a330 100644 --- a/examples/qml/referenceexamples/binding/happybirthdaysong.h +++ b/examples/qml/referenceexamples/binding/happybirthdaysong.h @@ -61,7 +61,7 @@ class HappyBirthdaySong : public QObject, public QQmlPropertyValueSource Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) Q_INTERFACES(QQmlPropertyValueSource) public: - HappyBirthdaySong(QObject *parent = 0); + HappyBirthdaySong(QObject *parent = nullptr); virtual void setTarget(const QQmlProperty &); diff --git a/examples/qml/referenceexamples/binding/person.h b/examples/qml/referenceexamples/binding/person.h index 2cff97a6cd..543b24f971 100644 --- a/examples/qml/referenceexamples/binding/person.h +++ b/examples/qml/referenceexamples/binding/person.h @@ -61,7 +61,7 @@ class ShoeDescription : public QObject Q_PROPERTY(QString brand READ brand WRITE setBrand NOTIFY shoeChanged) Q_PROPERTY(qreal price READ price WRITE setPrice NOTIFY shoeChanged) public: - ShoeDescription(QObject *parent = 0); + ShoeDescription(QObject *parent = nullptr); int size() const; void setSize(int); @@ -92,7 +92,7 @@ class Person : public QObject Q_PROPERTY(ShoeDescription *shoe READ shoe CONSTANT) // ![0] public: - Person(QObject *parent = 0); + Person(QObject *parent = nullptr); QString name() const; void setName(const QString &); @@ -110,14 +110,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 diff --git a/examples/qml/referenceexamples/coercion/birthdayparty.h b/examples/qml/referenceexamples/coercion/birthdayparty.h index bb20212ac9..554e7ab0da 100644 --- a/examples/qml/referenceexamples/coercion/birthdayparty.h +++ b/examples/qml/referenceexamples/coercion/birthdayparty.h @@ -62,7 +62,7 @@ class BirthdayParty : public QObject Q_PROPERTY(QQmlListProperty<Person> guests READ guests) // ![0] public: - BirthdayParty(QObject *parent = 0); + BirthdayParty(QObject *parent = nullptr); Person *host() const; void setHost(Person *); diff --git a/examples/qml/referenceexamples/coercion/person.h b/examples/qml/referenceexamples/coercion/person.h index 7169859cce..692cf4eb19 100644 --- a/examples/qml/referenceexamples/coercion/person.h +++ b/examples/qml/referenceexamples/coercion/person.h @@ -58,7 +58,7 @@ class Person : public QObject Q_PROPERTY(QString name READ name WRITE setName) Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize) public: - Person(QObject *parent = 0); + Person(QObject *parent = nullptr); QString name() const; void setName(const QString &); @@ -76,7 +76,7 @@ class Boy : public Person { Q_OBJECT public: - Boy(QObject * parent = 0); + Boy(QObject * parent = nullptr); }; //! [girl class] @@ -84,7 +84,7 @@ class Girl : public Person { Q_OBJECT public: - Girl(QObject * parent = 0); + Girl(QObject * parent = nullptr); }; //! [girl class] diff --git a/examples/qml/referenceexamples/default/birthdayparty.h b/examples/qml/referenceexamples/default/birthdayparty.h index 6acb395f47..ea63a6a16d 100644 --- a/examples/qml/referenceexamples/default/birthdayparty.h +++ b/examples/qml/referenceexamples/default/birthdayparty.h @@ -62,7 +62,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/default/person.h b/examples/qml/referenceexamples/default/person.h index 878c2953e5..87f69276bf 100644 --- a/examples/qml/referenceexamples/default/person.h +++ b/examples/qml/referenceexamples/default/person.h @@ -58,7 +58,7 @@ class Person : public QObject Q_PROPERTY(QString name READ name WRITE setName) Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize) public: - Person(QObject *parent = 0); + Person(QObject *parent = nullptr); QString name() const; void setName(const QString &); @@ -74,14 +74,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 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/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 diff --git a/examples/qml/referenceexamples/methods/birthdayparty.h b/examples/qml/referenceexamples/methods/birthdayparty.h index 27c164728a..0eb968a841 100644 --- a/examples/qml/referenceexamples/methods/birthdayparty.h +++ b/examples/qml/referenceexamples/methods/birthdayparty.h @@ -60,7 +60,7 @@ class BirthdayParty : public QObject Q_PROPERTY(Person *host READ host WRITE setHost) Q_PROPERTY(QQmlListProperty<Person> guests READ guests) public: - BirthdayParty(QObject *parent = 0); + BirthdayParty(QObject *parent = nullptr); Person *host() const; void setHost(Person *); diff --git a/examples/qml/referenceexamples/methods/person.h b/examples/qml/referenceexamples/methods/person.h index 488f8ebac4..749109dc72 100644 --- a/examples/qml/referenceexamples/methods/person.h +++ b/examples/qml/referenceexamples/methods/person.h @@ -58,7 +58,7 @@ class Person : public QObject Q_PROPERTY(QString name READ name WRITE setName) Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize) public: - Person(QObject *parent = 0); + Person(QObject *parent = nullptr); QString name() const; void setName(const QString &); diff --git a/examples/qml/referenceexamples/properties/birthdayparty.h b/examples/qml/referenceexamples/properties/birthdayparty.h index 00c5e443b4..8d62c8dcd5 100644 --- a/examples/qml/referenceexamples/properties/birthdayparty.h +++ b/examples/qml/referenceexamples/properties/birthdayparty.h @@ -68,7 +68,7 @@ class BirthdayParty : public QObject // ![2] // ![3] public: - BirthdayParty(QObject *parent = 0); + BirthdayParty(QObject *parent = nullptr); Person *host() const; void setHost(Person *); diff --git a/examples/qml/referenceexamples/properties/person.h b/examples/qml/referenceexamples/properties/person.h index 488f8ebac4..749109dc72 100644 --- a/examples/qml/referenceexamples/properties/person.h +++ b/examples/qml/referenceexamples/properties/person.h @@ -58,7 +58,7 @@ class Person : public QObject Q_PROPERTY(QString name READ name WRITE setName) Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize) public: - Person(QObject *parent = 0); + Person(QObject *parent = nullptr); QString name() const; void setName(const QString &); diff --git a/examples/qml/referenceexamples/signal/birthdayparty.h b/examples/qml/referenceexamples/signal/birthdayparty.h index 759450691e..9aecc8929c 100644 --- a/examples/qml/referenceexamples/signal/birthdayparty.h +++ b/examples/qml/referenceexamples/signal/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/signal/person.h b/examples/qml/referenceexamples/signal/person.h index 9b63773d49..06d4f2eb27 100644 --- a/examples/qml/referenceexamples/signal/person.h +++ b/examples/qml/referenceexamples/signal/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); @@ -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 diff --git a/examples/qml/referenceexamples/valuesource/birthdayparty.h b/examples/qml/referenceexamples/valuesource/birthdayparty.h index f965695cf6..18a9b96147 100644 --- a/examples/qml/referenceexamples/valuesource/birthdayparty.h +++ b/examples/qml/referenceexamples/valuesource/birthdayparty.h @@ -80,7 +80,7 @@ class BirthdayParty : public QObject // ![0] 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/valuesource/happybirthdaysong.h b/examples/qml/referenceexamples/valuesource/happybirthdaysong.h index 89bd13c295..5900f118f1 100644 --- a/examples/qml/referenceexamples/valuesource/happybirthdaysong.h +++ b/examples/qml/referenceexamples/valuesource/happybirthdaysong.h @@ -65,7 +65,7 @@ class HappyBirthdaySong : public QObject, public QQmlPropertyValueSource Q_PROPERTY(QString name READ name WRITE setName) // ![1] public: - HappyBirthdaySong(QObject *parent = 0); + HappyBirthdaySong(QObject *parent = nullptr); virtual void setTarget(const QQmlProperty &); // ![1] diff --git a/examples/qml/referenceexamples/valuesource/person.h b/examples/qml/referenceexamples/valuesource/person.h index 9b63773d49..06d4f2eb27 100644 --- a/examples/qml/referenceexamples/valuesource/person.h +++ b/examples/qml/referenceexamples/valuesource/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); @@ -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 |