diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-07-22 15:06:57 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-07-22 15:06:57 -0700 |
commit | 9a68e356af425b4268589b014eb50ef1f276b893 (patch) | |
tree | e965b82aa5b4d1bbe6c60db756977dc48f5fc353 /qt-ui/subsurfacewebservices.cpp | |
parent | aa9c2b738427dade65a0a273f57e2773f781e50a (diff) | |
download | subsurface-9a68e356af425b4268589b014eb50ef1f276b893.tar.gz |
Make password change asynchronous
This isn't perfect (if you make multiple requests things could go badly),
but it's better than just slapping the new password into the settings,
even if the update failed.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/subsurfacewebservices.cpp')
-rw-r--r-- | qt-ui/subsurfacewebservices.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp index 875b8e65c..8154ce5fb 100644 --- a/qt-ui/subsurfacewebservices.cpp +++ b/qt-ui/subsurfacewebservices.cpp @@ -1029,6 +1029,12 @@ void CloudStorageAuthenticate::uploadFinished() myLastError.clear(); } else if (cloudAuthReply == "[VERIFY]") { prefs.cloud_verification_status = CS_NEED_TO_VERIFY; + } else if (cloudAuthReply == "[PASSWDCHANGED]") { + free(prefs.cloud_storage_password); + prefs.cloud_storage_password = prefs.cloud_storage_newpassword; + prefs.cloud_storage_newpassword = NULL; + emit passwordChangeSuccessful(); + return; } else { prefs.cloud_verification_status = CS_INCORRECT_USER_PASSWD; myLastError = cloudAuthReply; |