aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/referenceexamples/adding/person.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qml/referenceexamples/adding/person.h')
-rw-r--r--examples/qml/referenceexamples/adding/person.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/qml/referenceexamples/adding/person.h b/examples/qml/referenceexamples/adding/person.h
index 530c335dee..03a72d184f 100644
--- a/examples/qml/referenceexamples/adding/person.h
+++ b/examples/qml/referenceexamples/adding/person.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -47,6 +47,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+
#ifndef PERSON_H
#define PERSON_H
@@ -61,7 +62,7 @@ class Person : public QObject
Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
QML_ELEMENT
public:
- Person(QObject *parent = nullptr);
+ using QObject::QObject;
QString name() const;
void setName(const QString &);
@@ -71,7 +72,7 @@ public:
private:
QString m_name;
- int m_shoeSize;
+ int m_shoeSize = 0;
};
//![0]