mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
cf78e4cb20
commit
f308a6b57b
2 changed files with 20 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue