mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
e944a93050
commit
ad1c3892f9
2 changed files with 3 additions and 13 deletions
|
@ -56,7 +56,9 @@ void QMLPrefs::setCredentialStatus(const qPrefCloudStorage::cloud_status value)
|
||||||
if (value == qPrefCloudStorage::CS_NOCLOUD) {
|
if (value == qPrefCloudStorage::CS_NOCLOUD) {
|
||||||
QMLManager::instance()->appendTextToLog("Switching to no cloud mode");
|
QMLManager::instance()->appendTextToLog("Switching to no cloud mode");
|
||||||
set_filename(NOCLOUD_LOCALSTORAGE);
|
set_filename(NOCLOUD_LOCALSTORAGE);
|
||||||
clearCredentials();
|
qPrefCloudStorage::set_cloud_storage_email(NULL);
|
||||||
|
qPrefCloudStorage::set_cloud_storage_password(NULL);
|
||||||
|
setCloudPin(NULL);
|
||||||
if (qPrefUnits::unit_system() == "imperial")
|
if (qPrefUnits::unit_system() == "imperial")
|
||||||
prefs.units = IMPERIAL_units;
|
prefs.units = IMPERIAL_units;
|
||||||
else if (qPrefUnits::unit_system() == "metric")
|
else if (qPrefUnits::unit_system() == "metric")
|
||||||
|
@ -90,12 +92,3 @@ void QMLPrefs::setShowPin(bool enable)
|
||||||
m_showPin = enable;
|
m_showPin = enable;
|
||||||
emit showPinChanged();
|
emit showPinChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*** public slot functions ***/
|
|
||||||
|
|
||||||
void QMLPrefs::clearCredentials()
|
|
||||||
{
|
|
||||||
qPrefCloudStorage::set_cloud_storage_email(NULL);
|
|
||||||
qPrefCloudStorage::set_cloud_storage_password(NULL);
|
|
||||||
setCloudPin(NULL);
|
|
||||||
}
|
|
||||||
|
|
|
@ -43,9 +43,6 @@ public:
|
||||||
bool showPin() const;
|
bool showPin() const;
|
||||||
void setShowPin(bool enable);
|
void setShowPin(bool enable);
|
||||||
|
|
||||||
public slots:
|
|
||||||
void clearCredentials();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_cloudPin;
|
QString m_cloudPin;
|
||||||
qPrefCloudStorage::cloud_status m_credentialStatus;
|
qPrefCloudStorage::cloud_status m_credentialStatus;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue