diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-03-24 21:42:20 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-03-24 21:42:20 -0700 |
commit | d99c9312195c2d5b867fa85e7b5aae8530fbf9b9 (patch) | |
tree | 57dc3954a1ec200b00e6ce6e9bd5d4e4fdf8cbc6 /qt-mobile/qmlmanager.cpp | |
parent | 246422d03fb3db1146eda1e77bfe2796f686f49c (diff) | |
download | subsurface-d99c9312195c2d5b867fa85e7b5aae8530fbf9b9.tar.gz |
QML UI: remove the checkbox for remembering the password
In the context of the mobile app this simply makes no sense. If the user
doesn't select this option, the app doesn't really work. So why have the option
in the first place?
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/qmlmanager.cpp')
-rw-r--r-- | qt-mobile/qmlmanager.cpp | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp index e372ca539..301a02ce1 100644 --- a/qt-mobile/qmlmanager.cpp +++ b/qt-mobile/qmlmanager.cpp @@ -103,7 +103,6 @@ void QMLManager::finishSetup() // Initialize cloud credentials. setCloudUserName(prefs.cloud_storage_email); setCloudPassword(prefs.cloud_storage_password); - setSaveCloudPassword(prefs.save_password_local); // if the cloud credentials are valid, we should get the GPS Webservice ID as well QString url; if (!cloudUserName().isEmpty() && @@ -149,25 +148,19 @@ void QMLManager::saveCloudCredentials() bool cloudCredentialsChanged = false; s.beginGroup("CloudStorage"); s.setValue("email", cloudUserName()); - s.setValue("save_password_local", saveCloudPassword()); - if (saveCloudPassword()) - s.setValue("password", cloudPassword()); + s.setValue("password", cloudPassword()); s.sync(); if (!same_string(prefs.cloud_storage_email, qPrintable(cloudUserName()))) { free(prefs.cloud_storage_email); prefs.cloud_storage_email = strdup(qPrintable(cloudUserName())); cloudCredentialsChanged = true; } - if (saveCloudPassword() != prefs.save_password_local) - prefs.save_password_local = saveCloudPassword(); cloudCredentialsChanged |= !same_string(prefs.cloud_storage_password, qPrintable(cloudPassword())); - if (saveCloudPassword()) { - if (!same_string(prefs.cloud_storage_password, qPrintable(cloudPassword()))) { - free(prefs.cloud_storage_password); - prefs.cloud_storage_password = strdup(qPrintable(cloudPassword())); - } + if (!same_string(prefs.cloud_storage_password, qPrintable(cloudPassword()))) { + free(prefs.cloud_storage_password); + prefs.cloud_storage_password = strdup(qPrintable(cloudPassword())); } if (cloudUserName().isEmpty() || cloudPassword().isEmpty()) { setStartPageText(RED_FONT + tr("Please enter valid cloud credentials.") + END_FONT); @@ -852,16 +845,6 @@ void QMLManager::appendTextToLog(const QString &newText) emit logTextChanged(); } -bool QMLManager::saveCloudPassword() const -{ - return m_saveCloudPassword; -} - -void QMLManager::setSaveCloudPassword(bool saveCloudPassword) -{ - m_saveCloudPassword = saveCloudPassword; -} - bool QMLManager::locationServiceEnabled() const { return m_locationServiceEnabled; |