diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-01-28 22:08:30 +0100 |
---|---|---|
committer | Jan Mulder <jlmulder@xs4all.nl> | 2018-01-31 14:47:26 +0100 |
commit | a25f54e3c29a936bb1bbfa66fa610c31c9b55808 (patch) | |
tree | 2091a7339c5f8c9f7169388b7c94dac985e0b078 /desktop-widgets/notificationwidget.h | |
parent | 1704e0801258d0ae78b18be32488e083458010f1 (diff) | |
download | subsurface-a25f54e3c29a936bb1bbfa66fa610c31c9b55808.tar.gz |
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>
Diffstat (limited to 'desktop-widgets/notificationwidget.h')
-rw-r--r-- | desktop-widgets/notificationwidget.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/desktop-widgets/notificationwidget.h b/desktop-widgets/notificationwidget.h index 70d94b8d6..93fc62605 100644 --- a/desktop-widgets/notificationwidget.h +++ b/desktop-widgets/notificationwidget.h @@ -21,6 +21,9 @@ public: void hideNotification(); QString getNotificationText(); +public +slots: + void showError(QString message); private: QFutureWatcher<void> future_watcher; |