summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qmlmanager.cpp20
-rw-r--r--mobile-widgets/qmlmanager.h3
2 files changed, 19 insertions, 4 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index 9d6472398..d9133a4ce 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -48,6 +48,7 @@
#include "core/exportfuncs.h"
#include "core/worldmap-save.h"
#include "core/uploadDiveLogsDE.h"
+#include "core/uploadDiveShare.h"
QMLManager *QMLManager::m_instance = NULL;
@@ -166,6 +167,14 @@ QMLManager::QMLManager() : m_locationServiceEnabled(false),
this, &QMLManager::uploadFinish);
connect(uploadDiveLogsDE::instance(), &uploadDiveLogsDE::uploadProgress,
this, &QMLManager::uploadProgress);
+ connect(uploadDiveShare::instance(), &uploadDiveShare::uploadProgress,
+ this, &QMLManager::uploadProgress);
+
+ // uploadDiveShare::uploadFinish() is defined with 3 parameters,
+ // whereas QMLManager::uploadFinish() is defined with 2 paramters,
+ // Solution add a slot as landing zone.
+ connect(uploadDiveShare::instance(), SIGNAL(uploadDiveShare::uploadFinish(bool, const QString &, const QByteArray &)),
+ this, SLOT(uploadFinishSlot(bool, const QString &, const QByteArray &)));
#if defined(Q_OS_ANDROID) || defined(Q_OS_IOS)
#if defined(Q_OS_ANDROID)
@@ -2201,13 +2210,16 @@ void QMLManager::exportToWEB(export_types type, QString userId, QString password
uploadDiveLogsDE::instance()->doUpload(false, userId, password);
break;
case EX_DIVESHARE:
- // TO BE IMPLEMENTED
- // Current call in Desktop-widgets
- // DiveShareExportDialog::instance()->
- // prepareDivesForUpload(ui->exportSelected->isChecked());
+ uploadDiveShare::instance()->doUpload(false, userId, anonymize);
break;
default:
qDebug() << "upload to unknown type " << type << " using " << userId << "/" << password << " remove names " << anonymize;
break;
}
}
+
+void QMLManager::uploadFinishSlot(bool success, const QString &text, const QByteArray &html)
+{
+ emit uploadFinish(success, text);
+}
+
diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h
index 862a7c894..0c61615a0 100644
--- a/mobile-widgets/qmlmanager.h
+++ b/mobile-widgets/qmlmanager.h
@@ -298,6 +298,9 @@ signals:
// From upload process
void uploadFinish(bool success, const QString &text);
void uploadProgress(qreal percentage);
+
+private slots:
+ void uploadFinishSlot(bool success, const QString &text, const QByteArray &html);
};
#endif