mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Use queued connection to thread-safe MainWindow error handling
Up to now, errors produced by threads were not directly shown in the MainWindow. Code running in the GUI thread had to manually show the errors. This can be simplified by using Qt's queued connection as message passing facility. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
1704e08012
commit
a25f54e3c2
5 changed files with 11 additions and 20 deletions
|
@ -222,9 +222,6 @@ void DownloadFromDCWidget::updateState(states state)
|
|||
else if (state == ERROR) {
|
||||
timer->stop();
|
||||
|
||||
// Show messages that worker thread produced.
|
||||
MainWindow::instance()->showErrors();
|
||||
|
||||
QMessageBox::critical(this, TITLE_OR_TEXT(tr("Error"), thread.error), QMessageBox::Ok);
|
||||
markChildrenAsEnabled();
|
||||
progress_bar_text = "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue