diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-02-12 22:06:38 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-02-12 22:06:38 -0800 |
commit | e5e5ab7480655e7913905de1c7f3aa929b4c54d1 (patch) | |
tree | d1c8977c84b2c65cfb8861aaa37aa121d86dd112 /qt-mobile | |
parent | 9367613a77ec62577ca9aebf6c1dcc90294e7419 (diff) | |
download | subsurface-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.cpp | 4 |
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(); |