diff options
Diffstat (limited to 'qt-ui/preferences.cpp')
-rw-r--r-- | qt-ui/preferences.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp index b5fbc601c..04fb3a825 100644 --- a/qt-ui/preferences.cpp +++ b/qt-ui/preferences.cpp @@ -423,10 +423,11 @@ void PreferencesDialog::syncSettings() } else { CloudStorageAuthenticate *cloudAuth = new CloudStorageAuthenticate(this); connect(cloudAuth, SIGNAL(finishedAuthenticate()), this, SLOT(cloudPinNeeded())); + connect(cloudAuth, SIGNAL(passwordChangeSuccessful()), this, SLOT(passwordUpdateSuccessfull())); QNetworkReply *reply = cloudAuth->backend(email, password, "", newpassword); ui.cloud_storage_new_passwd->setText(""); - ui.cloud_storage_password->setText(newpassword); - password = newpassword; + free(prefs.cloud_storage_newpassword); + prefs.cloud_storage_newpassword = strdup(qPrintable(newpassword)); } } } else if (prefs.cloud_verification_status == CS_UNKNOWN || @@ -688,6 +689,11 @@ void PreferencesDialog::on_resetSettings_clicked() } } +void PreferencesDialog::passwordUpdateSuccessfull() +{ + ui.cloud_storage_password->setText(prefs.cloud_storage_password); +} + void PreferencesDialog::emitSettingsChanged() { emit settingsChanged(); |