mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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 <dirk@hohndel.org>
This commit is contained in:
parent
6829d10086
commit
b7e353b7f6
1 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue