summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2019-12-10 09:39:45 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-11 12:36:43 -0500
commitcb252f39d7acfff5585a971f5af4f9cd0f758fff (patch)
treea6c6f592a24b9ed360d0b0d72af038c7e4635a59 /core
parent6ccea3c39d97de09bf94fe964eff4a04e530f3e9 (diff)
downloadsubsurface-cb252f39d7acfff5585a971f5af4f9cd0f758fff.tar.gz
core: corrected timeout and error text problem in uploadDiveLogsDE
incorrectly stopped timer before the upload was started. Signed-off-by: Jan Iversen <jan@casacondor.com>
Diffstat (limited to 'core')
-rw-r--r--core/uploadDiveLogsDE.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/uploadDiveLogsDE.cpp b/core/uploadDiveLogsDE.cpp
index 5e614d168..b4b50a7ba 100644
--- a/core/uploadDiveLogsDE.cpp
+++ b/core/uploadDiveLogsDE.cpp
@@ -37,10 +37,12 @@ void uploadDiveLogsDE::doUpload(bool selected, const QString &userid, const QStr
{
QString err;
+
/* generate a temporary filename and create/open that file with zip_open */
QString filename(QDir::tempPath() + "/divelogsde-upload.dld");
// delete file if it exist
+
QFile f(filename);
if (f.open(QIODevice::ReadOnly)) {
f.close();
@@ -49,15 +51,13 @@ void uploadDiveLogsDE::doUpload(bool selected, const QString &userid, const QStr
// Make zip file, with all dives, in divelogs.de format
if (!prepareDives(filename, selected)) {
- report_error(tr("Failed to create upload file %s\n").toUtf8(), qPrintable(filename));
- emit uploadFinish(false, err);
+ emit uploadFinish(false, tr("Cannot prepare dives, none selected?"));
timeout.stop();
return;
}
// And upload it
uploadDives(filename, userid, password);
- timeout.stop();
}