aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlmanager.cpp
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2017-07-24 10:42:44 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-25 10:04:20 +0900
commit97b770b837d53039cdebc20957b62b75840d629b (patch)
tree346ace31b649c9deb439e6dc7ea5a97da53da02a /mobile-widgets/qmlmanager.cpp
parent1fe22a28ed7105c55f72c1e6d540896118d59eff (diff)
downloadsubsurface-97b770b837d53039cdebc20957b62b75840d629b.tar.gz
Error message on mobile cloud credentials
Display proper error message when cloud credentials are incorrect. See #481 Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r--mobile-widgets/qmlmanager.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index eec2c00ac..cc9b1356d 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -372,7 +372,12 @@ void QMLManager::checkCredentialsAndExecute(execute_function_type execute)
}
myTimer.stop();
setCloudPin("");
- if (prefs.cloud_verification_status != CS_VERIFIED) {
+ if (prefs.cloud_verification_status == CS_INCORRECT_USER_PASSWD) {
+ appendTextToLog(QStringLiteral("Incorrect cloud credentials"));
+ setStartPageText(RED_FONT + tr("Incorrect cloud credentials") + END_FONT);
+ revertToNoCloudIfNeeded();
+ return;
+ } else if (prefs.cloud_verification_status != CS_VERIFIED) {
// here we need to enter the PIN
appendTextToLog(QStringLiteral("Need to verify the email address - enter PIN in desktop app"));
setStartPageText(RED_FONT + tr("Cannot connect to cloud storage - cloud account not verified") + END_FONT);