summaryrefslogtreecommitdiffstats
path: root/core/uploadDiveLogsDE.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2019-12-09 13:52:34 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-11 12:36:43 -0500
commit5a4128a8f2878a5e3b0906c8d0e58ba3fe3d4666 (patch)
treee672bc698d5eec099d0ff36ff4383ec4dac220b5 /core/uploadDiveLogsDE.cpp
parent9fd95c18bd08dd6d197c9e02a302dc97bd221f44 (diff)
downloadsubsurface-5a4128a8f2878a5e3b0906c8d0e58ba3fe3d4666.tar.gz
core: add uploadStatus signal to uploadDiveLogsDE
The uploadStatus signal can be used to inform the user about the process e.g. - preparing zip file - starting actual upload It is a suplement to uploadProgress, that only informs about the network part. Signed-off-by: Jan Iversen <jan@casacondor.com>
Diffstat (limited to 'core/uploadDiveLogsDE.cpp')
-rw-r--r--core/uploadDiveLogsDE.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/uploadDiveLogsDE.cpp b/core/uploadDiveLogsDE.cpp
index 29877af70..5e614d168 100644
--- a/core/uploadDiveLogsDE.cpp
+++ b/core/uploadDiveLogsDE.cpp
@@ -74,6 +74,8 @@ bool uploadDiveLogsDE::prepareDives(const QString &tempfile, const bool selected
xsltStylesheetPtr xslt = NULL;
struct zip *zip;
+ emit uploadStatus(tr("building zip file to upload"));
+
xslt = get_stylesheet("divelogs-export.xslt");
if (!xslt) {
qDebug() << errPrefix << "missing stylesheet";
@@ -214,6 +216,8 @@ void uploadDiveLogsDE::uploadDives(const QString &filename, const QString &useri
}
multipart = new QHttpMultiPart(QHttpMultiPart::FormDataType);
+ emit uploadStatus(tr("Uploading dives"));
+
// prepare header with filename (of all dives) and pointer to file
args = "form-data; name=\"userfile\"; filename=\"" + filename + "\"";
part1.setRawHeader("Content-Disposition", args.toLatin1());