mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
d02a03983d
commit
2f95141330
8 changed files with 45 additions and 52 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue