summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlmanager.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-29 05:04:47 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-29 09:48:43 -0700
commitf536da0ee32a39806efdbcbf9ed2edcaaa230f26 (patch)
treefe3638bd16c9503db523423565cc8f096512ea58 /mobile-widgets/qmlmanager.cpp
parent9ca0f7334b241fca133e7c2e22242c77d3071833 (diff)
downloadsubsurface-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.cpp3
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();