diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2013-12-09 16:07:00 +0200 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2013-12-09 16:23:58 +0200 |
commit | de8d532adba6597b5c60b7935896b9238f5600d6 (patch) | |
tree | 67527ed68de0b4a7e55c8b0b67503310f5e5f336 | |
parent | ca731cef893d4bdee8eab60c4e279ec3b83aba0d (diff) | |
download | subsurface-de8d532adba6597b5c60b7935896b9238f5600d6.tar.gz |
Divelogs.de: Improve the error handling post DLD creation
Only show a filename in the error report if such was previsly
set. We also add a string for translation, that is shown
in the main window.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
-rw-r--r-- | qt-ui/subsurfacewebservices.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp index 952927e8c..c114c80eb 100644 --- a/qt-ui/subsurfacewebservices.cpp +++ b/qt-ui/subsurfacewebservices.cpp @@ -539,6 +539,7 @@ void DivelogsDeWebServices::downloadDives() void DivelogsDeWebServices::prepareDivesForUpload() { + QString errorText(tr("Cannot create DLD file")); char *filename = prepare_dives_for_divelogs(true); if (filename) { QFile f(filename); @@ -549,8 +550,10 @@ void DivelogsDeWebServices::prepareDivesForUpload() f.remove(); return; } - mainWindow()->showError(QString("Cannot create file: ").append(filename)); + mainWindow()->showError(errorText.append(": ").append(filename)); + return; } + mainWindow()->showError(errorText.append("!")); } void DivelogsDeWebServices::uploadDives(QIODevice *dldContent) |