From e5e5ab7480655e7913905de1c7f3aa929b4c54d1 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 12 Feb 2016 22:06:38 -0800 Subject: 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 --- qt-mobile/qmlmanager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'qt-mobile') 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(); -- cgit v1.2.3-70-g09d2