From b7e353b7f66f3a9eba923cd07a26dced2e512053 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 10 Feb 2016 17:31:52 -0800 Subject: QML UI: more accurate messages on the start page Now the text shown better reflects what's going on, especially when the credentials are invalid. Signed-off-by: Dirk Hohndel --- qt-mobile/qmlmanager.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'qt-mobile') diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp index ff1c748a1..5aa10edfe 100644 --- a/qt-mobile/qmlmanager.cpp +++ b/qt-mobile/qmlmanager.cpp @@ -49,7 +49,7 @@ QMLManager::QMLManager() : m_locationServiceEnabled(false), appendTextToLog(QStringLiteral("build with Qt Version %1, runtime from Qt Version %2").arg(QT_VERSION_STR).arg(qVersion())); qDebug() << "Starting" << getUserAgent(); qDebug() << QStringLiteral("build with Qt Version %1, runtime from Qt Version %2").arg(QT_VERSION_STR).arg(qVersion()); - m_startPageText = tr("Searching for dive data"); + setStartPageText(tr("Starting...")); // create location manager service locationProvider = new GpsLocation(&appendTextToLogStandalone, this); set_git_update_cb(&gitProgressCB); @@ -93,13 +93,13 @@ void QMLManager::finishSetup() setSaveCloudPassword(prefs.save_password_local); // if the cloud credentials are valid, we should get the GPS Webservice ID as well QString url; - if (!same_string(prefs.cloud_storage_email, "") && - !same_string(prefs.cloud_storage_password, "") && + if (!cloudUserName().isEmpty() && + !cloudPassword().isEmpty() && getCloudURL(url) == 0) { openLocalThenRemote(url); } else { - appendTextToLog(QStringLiteral("no cloud credentials, tell user no dives found")); - setStartPageText(tr("No recorded dives found. You can download your dives to this device from the Subsurface cloud storage service, from your dive computer, or add them manually.")); + appendTextToLog(QStringLiteral("no cloud credentials")); + setStartPageText(tr("Please enter valid cloud credentials.")); } setDistanceThreshold(prefs.distance_threshold); setTimeThreshold(prefs.time_threshold / 60); -- cgit v1.2.3-70-g09d2