diff options
-rw-r--r-- | mobile-widgets/qml/main.qml | 13 | ||||
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 5 |
2 files changed, 7 insertions, 11 deletions
diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml index 27e5c4d57..eae7e518b 100644 --- a/mobile-widgets/qml/main.qml +++ b/mobile-widgets/qml/main.qml @@ -769,6 +769,8 @@ if you have network connectivity and want to sync your data to cloud storage."), } } Component.onCompleted: { + if (Screen.manufacturer + " " + Screen.model + " " + Screen.name !== " ") + manager.appendTextToLog("Running on " + Screen.manufacturer + " " + Screen.model + " " + Screen.name) manager.appendTextToLog("StartPage completed -- initialized is " + initialized) } } @@ -910,17 +912,6 @@ if you have network connectivity and want to sync your data to cloud storage."), showDownloadForPluggedInDevice() } } - - Component.onCompleted: { - // try to see if we can detect certain device vendors through these properties - if (Screen.manufacturer + " " + Screen.model + " " + Screen.name !== " ") - manager.appendTextToLog("Running on " + Screen.manufacturer + " " + Screen.model + " " + Screen.name) - rootItem.visible = true - manager.appendTextToLog("setting the defaultColumnWidth to " + Kirigami.Units.gridUnit * 21) - pageStack.defaultColumnWidth = Kirigami.Units.gridUnit * 21 - manager.finishSetup() - manager.appInitialized() - } onClosing: { // this duplicates the check that is already in the onBackRequested signal handler of the DiveList if (globalDrawer.visible) { diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 9727f1deb..847f1dd71 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -313,6 +313,11 @@ void QMLManager::applicationStateChanged(Qt::ApplicationState state) stateText.append((unsaved_changes() ? QLatin1String("") : QLatin1String("no ")) + QLatin1String("unsaved changes")); appendTextToLog(stateText); + if (state == Qt::ApplicationActive && !m_initialized) { + // once the app UI is displayed, finish our setup and mark the app as initialized + finishSetup(); + appInitialized(); + } if (state == Qt::ApplicationInactive && unsaved_changes()) { // saveChangesCloud ensures that we don't have two conflicting saves going on appendTextToLog("trying to save data as user switched away from app"); |