diff options
author | jan Iversen <jan@casacondor.com> | 2019-12-18 11:51:29 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-12-24 08:25:51 +0900 |
commit | d48a748a25a230d456c0ba0d95b1e541e89a0289 (patch) | |
tree | b8bdda6188c93c4cefc62ee908b321dcfd766e72 /mobile-widgets | |
parent | 4126409310cdbd53bf01f7f41249ae574fe175b9 (diff) | |
download | subsurface-d48a748a25a230d456c0ba0d95b1e541e89a0289.tar.gz |
mobile-widgets: limit use of QSettings in qmlmanager
Replace QSettings for userName/Password/credentials with proper qPrefCloudStorage calls
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index f44b6b12b..ca8d82f13 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -496,7 +496,6 @@ QMLManager *QMLManager::instance() void QMLManager::saveCloudCredentials() { - QSettings s; bool cloudCredentialsChanged = false; bool noCloud = QMLPrefs::instance()->credentialStatus() == qPrefCloudStorage::CS_NOCLOUD; @@ -537,11 +536,9 @@ void QMLManager::saveCloudCredentials() !verifyCredentials(QMLPrefs::instance()->cloudUserName(), QMLPrefs::instance()->cloudPassword(), QMLPrefs::instance()->cloudPin())) return; - s.beginGroup("CloudStorage"); - s.setValue("email", QMLPrefs::instance()->cloudUserName()); - s.setValue("password", QMLPrefs::instance()->cloudPassword()); - s.setValue("cloud_verification_status", QMLPrefs::instance()->credentialStatus()); - s.sync(); + qPrefCloudStorage::set_cloud_storage_email(QMLPrefs::instance()->cloudUserName()); + qPrefCloudStorage::set_cloud_storage_password(QMLPrefs::instance()->cloudPassword()); + qPrefCloudStorage::set_cloud_verification_status(QMLPrefs::instance()->credentialStatus()); if (!same_string(prefs.cloud_storage_password, qPrintable(QMLPrefs::instance()->cloudPassword()))) { |