diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-01-26 10:40:04 +0100 |
---|---|---|
committer | Jan Mulder <jlmulder@xs4all.nl> | 2018-01-31 14:47:26 +0100 |
commit | 8f81a22e7f26729cc2f4902ba7db8f696314539f (patch) | |
tree | fada0afb75654a203016e7b24ec6d1677d0622f6 /desktop-widgets | |
parent | f8f14c5edb43aafcc1d4c689af4a91d7274a4b82 (diff) | |
download | subsurface-8f81a22e7f26729cc2f4902ba7db8f696314539f.tar.gz |
Make report_error() reentrant
Remove the global error buffer and pass the error string directly
to the frontend. The frontend is then responsible for accumulating
errors.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 3c70f73f4..ac6289f34 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -89,9 +89,11 @@ extern "C" int updateProgress(const char *text) MainWindow *MainWindow::m_Instance = NULL; -extern "C" void showErrorFromC() +extern "C" void showErrorFromC(char *buf) { - emit MainWindow::instance()->showError(get_error_string()); + QString error(buf); + free(buf); + emit MainWindow::instance()->showError(error); } MainWindow::MainWindow() : QMainWindow(), |