mobile-widgets: remove clearCredentials()

clearCredentials() was only called from one place (in the same file), copy
functionality and remove function.

It was declared as a public slot, so this saves a little bit of overhead too.

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-27 09:34:35 +01:00 committed by Dirk Hohndel
parent e944a93050
commit ad1c3892f9
2 changed files with 3 additions and 13 deletions

View file

@ -56,7 +56,9 @@ void QMLPrefs::setCredentialStatus(const qPrefCloudStorage::cloud_status value)
if (value == qPrefCloudStorage::CS_NOCLOUD) {
QMLManager::instance()->appendTextToLog("Switching to no cloud mode");
set_filename(NOCLOUD_LOCALSTORAGE);
clearCredentials();
qPrefCloudStorage::set_cloud_storage_email(NULL);
qPrefCloudStorage::set_cloud_storage_password(NULL);
setCloudPin(NULL);
if (qPrefUnits::unit_system() == "imperial")
prefs.units = IMPERIAL_units;
else if (qPrefUnits::unit_system() == "metric")
@ -90,12 +92,3 @@ void QMLPrefs::setShowPin(bool enable)
m_showPin = enable;
emit showPinChanged();
}
/*** public slot functions ***/
void QMLPrefs::clearCredentials()
{
qPrefCloudStorage::set_cloud_storage_email(NULL);
qPrefCloudStorage::set_cloud_storage_password(NULL);
setCloudPin(NULL);
}

View file

@ -43,9 +43,6 @@ public:
bool showPin() const;
void setShowPin(bool enable);
public slots:
void clearCredentials();
private:
QString m_cloudPin;
qPrefCloudStorage::cloud_status m_credentialStatus;