diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-11-30 10:15:04 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-11-30 10:15:04 -0800 |
commit | f6ae8bf3ea6fee354bd4298fd0ebadd91fb0d36e (patch) | |
tree | def3373c5827b11c9b94147ec27117f0c6393157 /qt-mobile/qmlmanager.cpp | |
parent | 2f2e9da2cd18d0450fa791371922ba1844338bb6 (diff) | |
download | subsurface-f6ae8bf3ea6fee354bd4298fd0ebadd91fb0d36e.tar.gz |
QML UI: don't load dives before the UI has been instantiated
This should deal with a big part of the delay when starting the app.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/qmlmanager.cpp')
-rw-r--r-- | qt-mobile/qmlmanager.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp index 9d44fea91..92af3a89a 100644 --- a/qt-mobile/qmlmanager.cpp +++ b/qt-mobile/qmlmanager.cpp @@ -33,8 +33,6 @@ QMLManager::QMLManager() : setDistanceThreshold(prefs.distance_threshold); setTimeThreshold(prefs.time_threshold / 60); - if (!same_string(prefs.cloud_storage_email, "") && !same_string(prefs.cloud_storage_password, "")) - loadDives(); } QMLManager::~QMLManager() @@ -90,6 +88,12 @@ void QMLManager::savePreferences() void QMLManager::loadDives() { + if (same_string(prefs.cloud_storage_email, "") || same_string(prefs.cloud_storage_password, "")) { + qmlUiShowMessage("Please set up cloud storage credentials"); + appendTextToLog("Unable to load dives; cloud storage credentials missing"); + return; + } + qmlUiShowMessage("Loading dives..."); appendTextToLog("Loading dives..."); QString url; |