diff options
author | jan Iversen <jani@apache.org> | 2018-08-19 00:31:46 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-25 11:49:47 -0700 |
commit | da6e8a4cd5d80a4288129bf44b1efad69de1704f (patch) | |
tree | 5a69037fd50242d21a37203d79f2fb69ab9eb58d /mobile-widgets/qmlprefs.cpp | |
parent | b7a1bb670ce11b22e52361f4152b4853b97e13f5 (diff) | |
download | subsurface-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.cpp | 17 |
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); |