diff options
-rw-r--r-- | qt-mobile/qml/main.qml | 3 | ||||
-rw-r--r-- | qt-mobile/qmlmanager.cpp | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/qt-mobile/qml/main.qml b/qt-mobile/qml/main.qml index 1888a77e8..46123ddb3 100644 --- a/qt-mobile/qml/main.qml +++ b/qt-mobile/qml/main.qml @@ -105,7 +105,7 @@ MobileComponents.ApplicationWindow { stackView.push(themetest) } } - ] + ] MouseArea { height: childrenRect.height width: MobileComponents.Units.gridUnit * 10 @@ -272,5 +272,6 @@ MobileComponents.ApplicationWindow { Component.onCompleted: { print("MobileComponents.Units.gridUnit is: " + MobileComponents.Units.gridUnit); + manager.loadDives(); } } 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; |