diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-04-29 05:04:47 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-04-29 09:48:43 -0700 |
commit | f536da0ee32a39806efdbcbf9ed2edcaaa230f26 (patch) | |
tree | fe3638bd16c9503db523423565cc8f096512ea58 /mobile-widgets/qmlmanager.cpp | |
parent | 9ca0f7334b241fca133e7c2e22242c77d3071833 (diff) | |
download | subsurface-f536da0ee32a39806efdbcbf9ed2edcaaa230f26.tar.gz |
QML UI: make sure nothing is lost when changing cloud credentials
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 2149d5c86..9e2670242 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -253,6 +253,9 @@ void QMLManager::saveCloudCredentials() if (cloudUserName().isEmpty() || cloudPassword().isEmpty()) { setStartPageText(RED_FONT + tr("Please enter valid cloud credentials.") + END_FONT); } else if (cloudCredentialsChanged) { + // let's make sure there are no unsaved changes + saveChangesLocal(); + free(prefs.userid); prefs.userid = NULL; syncLoadFromCloud(); |