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