diff options
author | jan Iversen <jani@apache.org> | 2018-07-05 20:37:53 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-07-10 10:30:50 -0700 |
commit | 8d66633fe798f6c45978ea1b0d47aa04625d4ac5 (patch) | |
tree | 1a6b63b6720f52f3263fa371e6c9f95ccfacf3e7 /mobile-widgets/qmlprefs.h | |
parent | 7103f36c7c9ed0117a9f600cee6b2565d98a6638 (diff) | |
download | subsurface-8d66633fe798f6c45978ea1b0d47aa04625d4ac5.tar.gz |
core: make qPref::cloud_status the only version of the enum
add enum to qPref and remove elsewhere
update source core to reference qPref.
the enum cannot be in pref.h because it is to be used in qml and Q_ENUM
need the enum to be defined as part of the class
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'mobile-widgets/qmlprefs.h')
-rw-r--r-- | mobile-widgets/qmlprefs.h | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/mobile-widgets/qmlprefs.h b/mobile-widgets/qmlprefs.h index 90b4c290f..b628ef3fe 100644 --- a/mobile-widgets/qmlprefs.h +++ b/mobile-widgets/qmlprefs.h @@ -8,7 +8,6 @@ class QMLPrefs : public QObject { Q_OBJECT - Q_ENUM(cloud_status) Q_PROPERTY(QString cloudPassword MEMBER m_cloudPassword WRITE setCloudPassword @@ -21,7 +20,7 @@ class QMLPrefs : public QObject { MEMBER m_cloudUserName WRITE setCloudUserName NOTIFY cloudUserNameChanged) - Q_PROPERTY(cloud_status credentialStatus + Q_PROPERTY(qPref::cloud_status credentialStatus MEMBER m_credentialStatus WRITE setCredentialStatus NOTIFY credentialStatusChanged) @@ -37,7 +36,7 @@ class QMLPrefs : public QObject { MEMBER m_showPin WRITE setShowPin NOTIFY showPinChanged) - Q_PROPERTY(cloud_status oldStatus + Q_PROPERTY(qPref::cloud_status oldStatus MEMBER m_oldStatus WRITE setOldStatus NOTIFY oldStatusChanged) @@ -51,14 +50,6 @@ class QMLPrefs : public QObject { NOTIFY timeThresholdChanged) public: - enum cloud_status { - CS_UNKNOWN, - CS_INCORRECT_USER_PASSWD, - CS_NEED_TO_VERIFY, - CS_VERIFIED, - CS_NOCLOUD - }; - QMLPrefs(); ~QMLPrefs(); @@ -73,16 +64,16 @@ public: const QString cloudUserName() const; void setCloudUserName(const QString &cloudUserName); - cloud_status credentialStatus() const; - void setCredentialStatus(const cloud_status value); + qPref::cloud_status credentialStatus() const; + void setCredentialStatus(const qPref::cloud_status value); void setDeveloper(bool value); int distanceThreshold() const; void setDistanceThreshold(int distance); - cloud_status oldStatus() const; - void setOldStatus(const cloud_status value); + qPref::cloud_status oldStatus() const; + void setOldStatus(const qPref::cloud_status value); bool showPin() const; void setShowPin(bool enable); @@ -101,11 +92,11 @@ private: QString m_cloudPassword; QString m_cloudPin; QString m_cloudUserName; - cloud_status m_credentialStatus; + qPref::cloud_status m_credentialStatus; bool m_developer; int m_distanceThreshold; static QMLPrefs *m_instance; - cloud_status m_oldStatus; + qPref::cloud_status m_oldStatus; bool m_showPin; int m_timeThreshold; |