mobile-widgets: remove setCredentialStatus from revertToNoCloudIfNeeded

Update revertToNoCloudIfNeeded() to not use setCredentialStatus() by adding an
extra call to setOldStatus()

setOldStatus() is called in setCredentialStatus together with
set_cloud_verification_status() therefore these 2 calls need to added when
removing setCredentialStatus().

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:29:47 +01:00 committed by Dirk Hohndel
parent dc98b0a2ac
commit 814f6b3579

View file

@ -817,7 +817,8 @@ void QMLManager::revertToNoCloudIfNeeded()
prefs.cloud_storage_password = NULL;
qPrefCloudStorage::set_cloud_storage_email("");
qPrefCloudStorage::set_cloud_storage_password("");
QMLPrefs::instance()->setCredentialStatus(qPrefCloudStorage::CS_NOCLOUD);
QMLPrefs::instance()->setOldStatus((qPrefCloudStorage::cloud_status)qPrefCloudStorage::cloud_verification_status());
qPrefCloudStorage::set_cloud_verification_status(qPrefCloudStorage::CS_NOCLOUD);
set_filename(NOCLOUD_LOCALSTORAGE);
setStartPageText(RED_FONT + tr("Failed to connect to cloud server, reverting to no cloud status") + END_FONT);
}