From f7daadb1cd5aa85237a64f406528183eae7d0d3d Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 12 Jun 2016 18:05:33 -0700 Subject: QML UI: don't proceed unless cloud credentials are verified Signed-off-by: Dirk Hohndel --- mobile-widgets/qmlmanager.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mobile-widgets/qmlmanager.cpp') 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()) { -- cgit v1.2.3-70-g09d2