summaryrefslogtreecommitdiffstats
path: root/examples/corelib/bindableproperties/subscription/user.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/corelib/bindableproperties/subscription/user.h')
-rw-r--r--examples/corelib/bindableproperties/subscription/user.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/examples/corelib/bindableproperties/subscription/user.h b/examples/corelib/bindableproperties/subscription/user.h
index 1e16f9e901..dd32a4fe23 100644
--- a/examples/corelib/bindableproperties/subscription/user.h
+++ b/examples/corelib/bindableproperties/subscription/user.h
@@ -4,6 +4,7 @@
#ifndef USER_H
#define USER_H
+#include <QLocale>
#include <QObject>
//! [user-class]
@@ -13,13 +14,9 @@ class User : public QObject
Q_OBJECT
public:
- enum Country {
- None,
- Finland,
- Germany,
- Norway,
- };
+ using Country = QLocale::Territory;
+public:
Country country() const { return m_country; }
void setCountry(Country country);
@@ -31,8 +28,8 @@ signals:
void ageChanged();
private:
- Country m_country = Country::None;
- int m_age = 0;
+ Country m_country { QLocale::AnyTerritory };
+ int m_age { 0 };
};
//! [user-class]