summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlmanager.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-06-12 18:05:33 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-06-12 18:05:33 -0700
commitf7daadb1cd5aa85237a64f406528183eae7d0d3d (patch)
tree21a10684302cea7d13ae0ef4183fa84ae50850b6 /mobile-widgets/qmlmanager.cpp
parent1df085240dd673fddbd331b1df30111c984bcfdd (diff)
downloadsubsurface-f7daadb1cd5aa85237a64f406528183eae7d0d3d.tar.gz
QML UI: don't proceed unless cloud credentials are verified
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r--mobile-widgets/qmlmanager.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index 669072321..266981219 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -370,6 +370,18 @@ void QMLManager::retrieveUserid()
revertToNoCloudIfNeeded();
return;
}
+ if (prefs.cloud_verification_status == CS_NEED_TO_VERIFY) {
+ // 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);
+ revertToNoCloudIfNeeded();
+ return;
+ } else if (prefs.cloud_verification_status != CS_VERIFIED) {
+ appendTextToLog(QString("Cloud account verification failed - status %1").arg(prefs.cloud_verification_status));
+ setStartPageText(RED_FONT + tr("Cannot connect to cloud storage - check developer log") + END_FONT);
+ revertToNoCloudIfNeeded();
+ return;
+ }
setCredentialStatus(VALID);
QString userid(prefs.userid);
if (userid.isEmpty()) {