From ff9bdfd0dfa22493d6721a072d0923bf7c175434 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 16 Jan 2018 21:58:27 +0100 Subject: Fix PreferencesNetwork::passwordUpdateSuccessful slot In preferences_network.cpp, the CloudStorageAuthenticate::passwordChangeSuccessful signal was connected to the PreferencesNetwork::passwordUpdateSuccessful slot. This never worked, because passwordUpdateSuccessful() was declared as a normal member function, not a slot (hooray for Qt's weird runtime-checked signal system). While touching this code, change the weird SIGNAL/SLOT macros to actual member function, to at least get *some* compile-time checks. Signed-off-by: Berthold Stoeger --- desktop-widgets/preferences/preferences_network.cpp | 4 ++-- desktop-widgets/preferences/preferences_network.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'desktop-widgets') diff --git a/desktop-widgets/preferences/preferences_network.cpp b/desktop-widgets/preferences/preferences_network.cpp index 9cc12d328..a8cbbd70b 100644 --- a/desktop-widgets/preferences/preferences_network.cpp +++ b/desktop-widgets/preferences/preferences_network.cpp @@ -72,8 +72,8 @@ void PreferencesNetwork::syncSettings() report_error(qPrintable(tr("Cloud storage email and password can only consist of letters, numbers, and '.', '-', '_', and '+'."))); } else { CloudStorageAuthenticate *cloudAuth = new CloudStorageAuthenticate(this); - connect(cloudAuth, SIGNAL(finishedAuthenticate()), this, SLOT(updateCloudAuthenticationState())); - connect(cloudAuth, SIGNAL(passwordChangeSuccessful()), this, SLOT(passwordUpdateSuccessful())); + connect(cloudAuth, &CloudStorageAuthenticate::finishedAuthenticate, this, &PreferencesNetwork::updateCloudAuthenticationState); + connect(cloudAuth, &CloudStorageAuthenticate::passwordChangeSuccessful, this, &PreferencesNetwork::passwordUpdateSuccessful); cloudAuth->backend(email, password, "", newpassword); ui->cloud_storage_new_passwd->setText(""); cloud->setNewPassword(newpassword); diff --git a/desktop-widgets/preferences/preferences_network.h b/desktop-widgets/preferences/preferences_network.h index 9b9b6d467..844cce3f0 100644 --- a/desktop-widgets/preferences/preferences_network.h +++ b/desktop-widgets/preferences/preferences_network.h @@ -20,10 +20,10 @@ public: public slots: void proxyType_changed(int i); void updateCloudAuthenticationState(); + void passwordUpdateSuccessful(); private: Ui::PreferencesNetwork *ui; - void passwordUpdateSuccessful(); }; #endif -- cgit v1.2.3-70-g09d2