summaryrefslogtreecommitdiffstats
path: root/core/uploadDiveLogsDE.h
diff options
context:
space:
mode:
authorGravatar Richard Fuchs <dfx@dfx.at>2021-08-03 14:04:52 -0400
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-08-06 11:05:06 -0700
commitf308a6b57be0a79bef93d8b088dca1c2baf9f105 (patch)
tree1792151ae4f3483c29dc031eecb48f342af89a98 /core/uploadDiveLogsDE.h
parentcf78e4cb206d1053800c29fd4f147b048510beb3 (diff)
downloadsubsurface-f308a6b57be0a79bef93d8b088dca1c2baf9f105.tar.gz
export: clean up temp file after divelogs.de upload
This adds a cleanup function to be called after a divelogs.de upload finishes (successful or not) to make sure the temporary zip file is closed and removed. Signed-off-by: Richard Fuchs <dfx@dfx.at>
Diffstat (limited to 'core/uploadDiveLogsDE.h')
-rw-r--r--core/uploadDiveLogsDE.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/uploadDiveLogsDE.h b/core/uploadDiveLogsDE.h
index da47b14af..0259d1fb1 100644
--- a/core/uploadDiveLogsDE.h
+++ b/core/uploadDiveLogsDE.h
@@ -4,6 +4,7 @@
#include <QNetworkReply>
#include <QHttpMultiPart>
#include <QTimer>
+#include <QFile>
class uploadDiveLogsDE : public QObject {
@@ -28,10 +29,12 @@ private:
uploadDiveLogsDE();
void uploadDives(const QString &filename, const QString &userid, const QString &password);
+ void cleanupTempFile();
// only to be used in desktop-widgets::subsurfacewebservices
bool prepareDives(const QString &tempfile, bool selected);
+ QFile tempFile;
QNetworkReply *reply;
QHttpMultiPart *multipart;
QTimer timeout;