summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlprefs.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-07-05 20:37:53 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-07-10 10:30:50 -0700
commit8d66633fe798f6c45978ea1b0d47aa04625d4ac5 (patch)
tree1a6b63b6720f52f3263fa371e6c9f95ccfacf3e7 /mobile-widgets/qmlprefs.cpp
parent7103f36c7c9ed0117a9f600cee6b2565d98a6638 (diff)
downloadsubsurface-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.cpp')
-rw-r--r--mobile-widgets/qmlprefs.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/mobile-widgets/qmlprefs.cpp b/mobile-widgets/qmlprefs.cpp
index 4330597ce..03f51f765 100644
--- a/mobile-widgets/qmlprefs.cpp
+++ b/mobile-widgets/qmlprefs.cpp
@@ -11,10 +11,10 @@
QMLPrefs *QMLPrefs::m_instance = NULL;
QMLPrefs::QMLPrefs() :
- m_credentialStatus(QMLPrefs::CS_UNKNOWN),
+ m_credentialStatus(qPref::CS_UNKNOWN),
m_developer(false),
m_distanceThreshold(1000),
- m_oldStatus(QMLPrefs::CS_UNKNOWN),
+ m_oldStatus(qPref::CS_UNKNOWN),
m_showPin(false),
m_timeThreshold(60)
{
@@ -69,16 +69,16 @@ void QMLPrefs::setCloudUserName(const QString &cloudUserName)
emit cloudUserNameChanged();
}
-QMLPrefs::cloud_status QMLPrefs::credentialStatus() const
+qPref::cloud_status QMLPrefs::credentialStatus() const
{
return m_credentialStatus;
}
-void QMLPrefs::setCredentialStatus(const QMLPrefs::cloud_status value)
+void QMLPrefs::setCredentialStatus(const qPref::cloud_status value)
{
if (m_credentialStatus != value) {
setOldStatus(m_credentialStatus);
- if (value == QMLPrefs::CS_NOCLOUD) {
+ if (value == qPref::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();
}
-QMLPrefs::cloud_status QMLPrefs::oldStatus() const
+qPref::cloud_status QMLPrefs::oldStatus() const
{
return m_oldStatus;
}
-void QMLPrefs::setOldStatus(const QMLPrefs::cloud_status value)
+void QMLPrefs::setOldStatus(const qPref::cloud_status value)
{
if (m_oldStatus != value) {
m_oldStatus = value;
@@ -177,7 +177,7 @@ void QMLPrefs::cancelCredentialsPinSetup()
*/
QSettings s;
- setCredentialStatus(QMLPrefs::CS_UNKNOWN);
+ setCredentialStatus(qPref::CS_UNKNOWN);
s.beginGroup("CloudStorage");
s.setValue("email", m_cloudUserName);
s.setValue("password", m_cloudPassword);