From f536da0ee32a39806efdbcbf9ed2edcaaa230f26 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 29 Apr 2016 05:04:47 -0700 Subject: QML UI: make sure nothing is lost when changing cloud credentials Signed-off-by: Dirk Hohndel --- mobile-widgets/qmlmanager.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mobile-widgets') 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(); -- cgit v1.2.3-70-g09d2