diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2018-08-09 07:12:32 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-11 11:14:22 -0700 |
commit | fbf94d4a7bda22e0b15b8705ed64968c2a57d9dc (patch) | |
tree | 3ca0f226d21712e8d47556f3f07957f68102cc21 /mobile-widgets | |
parent | b85098d401a8c3676beb4beac39a39c53f73baeb (diff) | |
download | subsurface-fbf94d4a7bda22e0b15b8705ed64968c2a57d9dc.tar.gz |
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 <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/qml/main.qml | 1 | ||||
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 12 | ||||
-rw-r--r-- | mobile-widgets/qmlmanager.h | 1 |
3 files changed, 14 insertions, 0 deletions
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(); |