summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlprefs.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-08-19 00:31:46 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-25 11:49:47 -0700
commitda6e8a4cd5d80a4288129bf44b1efad69de1704f (patch)
tree5a69037fd50242d21a37203d79f2fb69ab9eb58d /mobile-widgets/qmlprefs.cpp
parentb7a1bb670ce11b22e52361f4152b4853b97e13f5 (diff)
downloadsubsurface-da6e8a4cd5d80a4288129bf44b1efad69de1704f.tar.gz
mobile-widgets: remove QSettings
update qmlprefs and qmlmanager to use qPref Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'mobile-widgets/qmlprefs.cpp')
-rw-r--r--mobile-widgets/qmlprefs.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/mobile-widgets/qmlprefs.cpp b/mobile-widgets/qmlprefs.cpp
index defd28025..145ddf91f 100644
--- a/mobile-widgets/qmlprefs.cpp
+++ b/mobile-widgets/qmlprefs.cpp
@@ -143,16 +143,12 @@ void QMLPrefs::setTimeThreshold(int time)
const QString QMLPrefs::theme() const
{
- QSettings s;
- s.beginGroup("Theme");
- return s.value("currentTheme", "Blue").toString();
+ return qPrefDisplay::theme();
}
void QMLPrefs::setTheme(QString theme)
{
- QSettings s;
- s.beginGroup("Theme");
- s.setValue("currentTheme", theme);
+ qPrefDisplay::set_theme(theme);
emit themeChanged();
}
@@ -175,14 +171,11 @@ void QMLPrefs::cancelCredentialsPinSetup()
* Notice that this function is also used to switch to a different
* cloud account, so the name is not perfect.
*/
- QSettings s;
setCredentialStatus(qPref::CS_UNKNOWN);
- s.beginGroup("CloudStorage");
- s.setValue("email", m_cloudUserName);
- s.setValue("password", m_cloudPassword);
- s.setValue("cloud_verification_status", m_credentialStatus);
- s.sync();
+ qPrefCloudStorage::set_cloud_storage_email(m_cloudUserName);
+ qPrefCloudStorage::set_cloud_storage_password(m_cloudPassword);
+ qPrefCloudStorage::set_cloud_verification_status(m_credentialStatus);
QMLManager::instance()->setStartPageText(tr("Starting..."));
setShowPin(false);