mobile-widgets: remove second setCredentialStatus()

call setOldStatus() and set_filename().

saveCredentials() will adjust email and password.

Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
jan Iversen 2019-12-28 18:42:04 +01:00 committed by Dirk Hohndel
parent 6084a27229
commit 1fd6b59a21

View file

@ -456,7 +456,9 @@ void QMLManager::finishSetup()
openLocalThenRemote(url);
} else if (!empty_string(existing_filename) &&
qPrefCloudStorage::cloud_verification_status() != qPrefCloudStorage::CS_UNKNOWN) {
QMLPrefs::instance()->setCredentialStatus(qPrefCloudStorage::CS_NOCLOUD);
QMLPrefs::instance()->setOldStatus((qPrefCloudStorage::cloud_status)qPrefCloudStorage::cloud_verification_status());
set_filename(NOCLOUD_LOCALSTORAGE);
qPrefCloudStorage::set_cloud_verification_status(qPrefCloudStorage::CS_NOCLOUD);
saveCloudCredentials(qPrefCloudStorage::cloud_storage_email(), qPrefCloudStorage::cloud_storage_password(), qPrefCloudStorage::cloud_storage_pin());
appendTextToLog(tr("working in no-cloud mode"));
int error = parse_file(existing_filename, &dive_table, &trip_table, &dive_site_table);