diff options
author | jan Iversen <jani@apache.org> | 2018-06-16 10:08:34 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-07-04 05:32:30 +0800 |
commit | 2f951413303e10a80e540cacd0c6c282f8ce82cc (patch) | |
tree | d20a09bc203f93b65090727c2e3e68a42e985836 /mobile-widgets/qmlprefs.h | |
parent | d02a03983d91da1d10aac5b0a5d84d15e94e9291 (diff) | |
download | subsurface-2f951413303e10a80e540cacd0c6c282f8ce82cc.tar.gz |
core: remove double definition of enum cloud_storage_status
Remove cloud_storage_status from qmlprefs.h.
usage to qPref::
enum cloud_storage_status is not used from C, but only from C++, and
having the same structure defined multiple times is a maintenance
challenge.
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'mobile-widgets/qmlprefs.h')
-rw-r--r-- | mobile-widgets/qmlprefs.h | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/mobile-widgets/qmlprefs.h b/mobile-widgets/qmlprefs.h index 6acba5438..dc8de0686 100644 --- a/mobile-widgets/qmlprefs.h +++ b/mobile-widgets/qmlprefs.h @@ -3,11 +3,12 @@ #define QMLPREFS_H #include <QObject> +#include "core/settings/qPref.h" class QMLPrefs : public QObject { Q_OBJECT - Q_ENUMS(cloud_status_qml) + Q_ENUMS(cloud_status) Q_PROPERTY(QString cloudPassword MEMBER m_cloudPassword WRITE setCloudPassword @@ -20,7 +21,7 @@ class QMLPrefs : public QObject { MEMBER m_cloudUserName WRITE setCloudUserName NOTIFY cloudUserNameChanged) - Q_PROPERTY(cloud_status_qml credentialStatus + Q_PROPERTY(cloud_status credentialStatus MEMBER m_credentialStatus WRITE setCredentialStatus NOTIFY credentialStatusChanged) @@ -36,7 +37,7 @@ class QMLPrefs : public QObject { MEMBER m_showPin WRITE setShowPin NOTIFY showPinChanged) - Q_PROPERTY(cloud_status_qml oldStatus + Q_PROPERTY(cloud_status oldStatus MEMBER m_oldStatus WRITE setOldStatus NOTIFY oldStatusChanged) @@ -55,14 +56,6 @@ public: static QMLPrefs *instance(); - enum cloud_status_qml { - CS_UNKNOWN, - CS_INCORRECT_USER_PASSWD, - CS_NEED_TO_VERIFY, - CS_VERIFIED, - CS_NOCLOUD - }; - const QString cloudPassword() const; void setCloudPassword(const QString &cloudPassword); @@ -72,16 +65,16 @@ public: const QString cloudUserName() const; void setCloudUserName(const QString &cloudUserName); - cloud_status_qml credentialStatus() const; - void setCredentialStatus(const cloud_status_qml value); + cloud_status credentialStatus() const; + void setCredentialStatus(const cloud_status value); void setDeveloper(bool value); int distanceThreshold() const; void setDistanceThreshold(int distance); - cloud_status_qml oldStatus() const; - void setOldStatus(const cloud_status_qml value); + cloud_status oldStatus() const; + void setOldStatus(const cloud_status value); bool showPin() const; void setShowPin(bool enable); @@ -100,11 +93,11 @@ private: QString m_cloudPassword; QString m_cloudPin; QString m_cloudUserName; - cloud_status_qml m_credentialStatus; + cloud_status m_credentialStatus; bool m_developer; int m_distanceThreshold; static QMLPrefs *m_instance; - cloud_status_qml m_oldStatus; + cloud_status m_oldStatus; bool m_showPin; int m_timeThreshold; |