From fbf94d4a7bda22e0b15b8705ed64968c2a57d9dc Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 9 Aug 2018 07:12:32 -0700 Subject: QML UI: add callback to run after app is fully initialized And then use that to check for pending Intents on Android. Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/main.qml | 1 + mobile-widgets/qmlmanager.cpp | 12 ++++++++++++ mobile-widgets/qmlmanager.h | 1 + 3 files changed, 14 insertions(+) (limited to 'mobile-widgets') diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml index 0a2a95c0a..d8e11809c 100644 --- a/mobile-widgets/qml/main.qml +++ b/mobile-widgets/qml/main.qml @@ -636,6 +636,7 @@ if you have network connectivity and want to sync your data to cloud storage."), diveList.opacity = 1 rootItem.opacity = 1 pageStack.defaultColumnWidth = Kirigami.Units.gridUnit * 28 + manager.appInitialized() } /* TODO: Verify where opacity went to. Behavior on opacity { diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 94a47e51c..e502410af 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -1856,3 +1856,15 @@ void QMLManager::showDownloadPage(QString deviceString) m_pluggedInDeviceName = strdup(qPrintable(name)); emit pluggedInDeviceNameChanged(); } + +#if defined(Q_OS_ANDROID) +// implemented in core/android.cpp +void checkPendingIntents(); +#endif + +void QMLManager::appInitialized() +{ +#if defined(Q_OS_ANDROID) + checkPendingIntents(); +#endif +} diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h index 9b956aafe..baecfea88 100644 --- a/mobile-widgets/qmlmanager.h +++ b/mobile-widgets/qmlmanager.h @@ -144,6 +144,7 @@ public: #endif public slots: + void appInitialized(); void applicationStateChanged(Qt::ApplicationState state); void savePreferences(); void saveCloudCredentials(); -- cgit v1.2.3-70-g09d2