diff options
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 6 | ||||
-rw-r--r-- | mobile-widgets/qmlmanager.h | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 21507c278..9d6472398 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -161,6 +161,12 @@ QMLManager::QMLManager() : m_locationServiceEnabled(false), timer.start(); connect(qobject_cast<QApplication *>(QApplication::instance()), &QApplication::applicationStateChanged, this, &QMLManager::applicationStateChanged); + // make upload signals available in QML + connect(uploadDiveLogsDE::instance(), &uploadDiveLogsDE::uploadFinish, + this, &QMLManager::uploadFinish); + connect(uploadDiveLogsDE::instance(), &uploadDiveLogsDE::uploadProgress, + this, &QMLManager::uploadProgress); + #if defined(Q_OS_ANDROID) || defined(Q_OS_IOS) #if defined(Q_OS_ANDROID) // on Android we first try the GenericDataLocation (typically /storage/emulated/0) and if that fails diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h index 4653c47a5..862a7c894 100644 --- a/mobile-widgets/qmlmanager.h +++ b/mobile-widgets/qmlmanager.h @@ -294,6 +294,10 @@ signals: void pluggedInDeviceNameChanged(); void showNonDiveComputersChanged(); void DC_ForceDownloadChanged(); + + // From upload process + void uploadFinish(bool success, const QString &text); + void uploadProgress(qreal percentage); }; #endif |