summaryrefslogtreecommitdiffstats
path: root/qt-mobile
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-02-12 22:06:38 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-02-12 22:06:38 -0800
commite5e5ab7480655e7913905de1c7f3aa929b4c54d1 (patch)
treed1c8977c84b2c65cfb8861aaa37aa121d86dd112 /qt-mobile
parent9367613a77ec62577ca9aebf6c1dcc90294e7419 (diff)
downloadsubsurface-e5e5ab7480655e7913905de1c7f3aa929b4c54d1.tar.gz
QML UI: don't even try to connect if email or password are empty
This way the user gets better messages on the screen. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile')
-rw-r--r--qt-mobile/qmlmanager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp
index 3ce504f67..1539c569c 100644
--- a/qt-mobile/qmlmanager.cpp
+++ b/qt-mobile/qmlmanager.cpp
@@ -160,7 +160,9 @@ void QMLManager::saveCloudCredentials()
prefs.cloud_storage_password = strdup(qPrintable(cloudPassword()));
}
}
- if (cloudCredentialsChanged) {
+ if (cloudUserName().isEmpty() || cloudPassword().isEmpty()) {
+ setStartPageText(tr("Please enter valid cloud credentials."));
+ } else if (cloudCredentialsChanged) {
free(prefs.userid);
prefs.userid = NULL;
syncLoadFromCloud();