mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML-UI: make sure errors make it to the log
get_error_message() clears the error message in the process, so calling it twice in a row does not do what you might think it does. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
da2da116b5
commit
dcce7358ff
1 changed files with 7 additions and 5 deletions
|
@ -108,13 +108,15 @@ void QMLManager::loadDives()
|
||||||
int error = parse_file(fileNamePrt.data());
|
int error = parse_file(fileNamePrt.data());
|
||||||
if (!error) {
|
if (!error) {
|
||||||
report_error("filename is now %s", fileNamePrt.data());
|
report_error("filename is now %s", fileNamePrt.data());
|
||||||
qmlUiShowMessage(get_error_string());
|
const char *error_string = get_error_string();
|
||||||
appendTextToLog(get_error_string());
|
qmlUiShowMessage(error_string);
|
||||||
|
appendTextToLog(error_string);
|
||||||
set_filename(fileNamePrt.data(), true);
|
set_filename(fileNamePrt.data(), true);
|
||||||
appendTextToLog(fileNamePrt.data());
|
|
||||||
} else {
|
} else {
|
||||||
qmlUiShowMessage(get_error_string());
|
report_error("failed to open file %s", fileNamePrt.data());
|
||||||
appendTextToLog(get_error_string());
|
const char *error_string = get_error_string();
|
||||||
|
qmlUiShowMessage(error_string);
|
||||||
|
appendTextToLog(error_string);
|
||||||
}
|
}
|
||||||
process_dives(false, false);
|
process_dives(false, false);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue