diff options
author | 2018-07-05 09:46:07 +0200 | |
---|---|---|
committer | 2018-07-05 12:31:56 -0700 | |
commit | 19803ab3c30c3a77929de49aed19584e9de2f117 (patch) | |
tree | 62f59ebe5833cccfb5c22e4301c85133fa69d4a1 /mobile-widgets/qmlprefs.cpp | |
parent | 5fc2e0f80f68acf2b54e34dd0d8950ea34ac0a98 (diff) | |
download | subsurface-19803ab3c30c3a77929de49aed19584e9de2f117.tar.gz |
mobile-widgets: solve cloudstatus register problem
Use Q_ENUM instad of Q_ENUMS (which is depreciated) since it does the
meta registration for all Qt platforms.
Q_ENUM require the enum to be defined in the class and cannot refer to
a global class, therefore copied enum to class.
This commit is made to get the release to work, with minimal changes,
this class will be moved to qPref and the double definition solved
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'mobile-widgets/qmlprefs.cpp')
-rw-r--r-- | mobile-widgets/qmlprefs.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mobile-widgets/qmlprefs.cpp b/mobile-widgets/qmlprefs.cpp index a166fdd5a..4330597ce 100644 --- a/mobile-widgets/qmlprefs.cpp +++ b/mobile-widgets/qmlprefs.cpp @@ -11,10 +11,10 @@ QMLPrefs *QMLPrefs::m_instance = NULL; QMLPrefs::QMLPrefs() : - m_credentialStatus(CS_UNKNOWN), + m_credentialStatus(QMLPrefs::CS_UNKNOWN), m_developer(false), m_distanceThreshold(1000), - m_oldStatus(CS_UNKNOWN), + m_oldStatus(QMLPrefs::CS_UNKNOWN), m_showPin(false), m_timeThreshold(60) { @@ -69,16 +69,16 @@ void QMLPrefs::setCloudUserName(const QString &cloudUserName) emit cloudUserNameChanged(); } -cloud_status QMLPrefs::credentialStatus() const +QMLPrefs::cloud_status QMLPrefs::credentialStatus() const { return m_credentialStatus; } -void QMLPrefs::setCredentialStatus(const cloud_status value) +void QMLPrefs::setCredentialStatus(const QMLPrefs::cloud_status value) { if (m_credentialStatus != value) { setOldStatus(m_credentialStatus); - if (value == CS_NOCLOUD) { + if (value == QMLPrefs::CS_NOCLOUD) { QMLManager::instance()->appendTextToLog("Switching to no cloud mode"); set_filename(NOCLOUD_LOCALSTORAGE); clearCredentials(); @@ -105,12 +105,12 @@ void QMLPrefs::setDistanceThreshold(int distance) emit distanceThresholdChanged(); } -cloud_status QMLPrefs::oldStatus() const +QMLPrefs::cloud_status QMLPrefs::oldStatus() const { return m_oldStatus; } -void QMLPrefs::setOldStatus(const cloud_status value) +void QMLPrefs::setOldStatus(const QMLPrefs::cloud_status value) { if (m_oldStatus != value) { m_oldStatus = value; @@ -177,7 +177,7 @@ void QMLPrefs::cancelCredentialsPinSetup() */ QSettings s; - setCredentialStatus(CS_UNKNOWN); + setCredentialStatus(QMLPrefs::CS_UNKNOWN); s.beginGroup("CloudStorage"); s.setValue("email", m_cloudUserName); s.setValue("password", m_cloudPassword); |