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>
This commit is contained in:
Dirk Hohndel 2016-02-12 22:06:38 -08:00
parent 9367613a77
commit e5e5ab7480

View file

@ -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();