mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
4126409310
commit
d48a748a25
1 changed files with 3 additions and 6 deletions
|
@ -496,7 +496,6 @@ QMLManager *QMLManager::instance()
|
||||||
|
|
||||||
void QMLManager::saveCloudCredentials()
|
void QMLManager::saveCloudCredentials()
|
||||||
{
|
{
|
||||||
QSettings s;
|
|
||||||
bool cloudCredentialsChanged = false;
|
bool cloudCredentialsChanged = false;
|
||||||
bool noCloud = QMLPrefs::instance()->credentialStatus() == qPrefCloudStorage::CS_NOCLOUD;
|
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()))
|
!verifyCredentials(QMLPrefs::instance()->cloudUserName(), QMLPrefs::instance()->cloudPassword(), QMLPrefs::instance()->cloudPin()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
s.beginGroup("CloudStorage");
|
qPrefCloudStorage::set_cloud_storage_email(QMLPrefs::instance()->cloudUserName());
|
||||||
s.setValue("email", QMLPrefs::instance()->cloudUserName());
|
qPrefCloudStorage::set_cloud_storage_password(QMLPrefs::instance()->cloudPassword());
|
||||||
s.setValue("password", QMLPrefs::instance()->cloudPassword());
|
qPrefCloudStorage::set_cloud_verification_status(QMLPrefs::instance()->credentialStatus());
|
||||||
s.setValue("cloud_verification_status", QMLPrefs::instance()->credentialStatus());
|
|
||||||
s.sync();
|
|
||||||
|
|
||||||
if (!same_string(prefs.cloud_storage_password,
|
if (!same_string(prefs.cloud_storage_password,
|
||||||
qPrintable(QMLPrefs::instance()->cloudPassword()))) {
|
qPrintable(QMLPrefs::instance()->cloudPassword()))) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue