From ad1c3892f97fd1a95398182974397682e2c5521c Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Fri, 27 Dec 2019 09:34:35 +0100 Subject: 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 Signed-off-by: Dirk Hohndel --- mobile-widgets/qmlprefs.cpp | 13 +++---------- mobile-widgets/qmlprefs.h | 3 --- 2 files changed, 3 insertions(+), 13 deletions(-) (limited to 'mobile-widgets') 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; -- cgit v1.2.3-70-g09d2