diff options
author | jan Iversen <jan@casacondor.com> | 2019-12-27 09:34:35 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-12-28 08:34:56 -0800 |
commit | ad1c3892f97fd1a95398182974397682e2c5521c (patch) | |
tree | f02a106ab1b8d856506a4b3e4441fc3a8fbf4c86 /mobile-widgets | |
parent | e944a93050c910d12fe8fe7f4d8194b3148818f7 (diff) | |
download | subsurface-ad1c3892f97fd1a95398182974397682e2c5521c.tar.gz |
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>
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/qmlprefs.cpp | 13 | ||||
-rw-r--r-- | mobile-widgets/qmlprefs.h | 3 |
2 files changed, 3 insertions, 13 deletions
diff --git a/mobile-widgets/qmlprefs.cpp b/mobile-widgets/qmlprefs.cpp index 5b819aaf0..eaeab9ceb 100644 --- a/mobile-widgets/qmlprefs.cpp +++ b/mobile-widgets/qmlprefs.cpp @@ -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); -} diff --git a/mobile-widgets/qmlprefs.h b/mobile-widgets/qmlprefs.h index 6d36334ce..67b086c95 100644 --- a/mobile-widgets/qmlprefs.h +++ b/mobile-widgets/qmlprefs.h @@ -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; |