mobile-widgets: make upload signals available to QML

Connect signal to signal in QMLManager to avoid registring the
upload class.

Signed-off-by: Jan Iversen <jan@casacondor.com>
This commit is contained in:
jan Iversen 2019-12-08 09:23:45 +01:00 committed by Dirk Hohndel
parent 5cba410aa6
commit 4b2cae3f7c
2 changed files with 10 additions and 0 deletions

View file

@ -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

View file

@ -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