sigrokproject / pulseview

Read-only mirror of the official repo at git://sigrok.org/pulseview. Pull requests welcome. Please file bugreports at sigrok.org/bugzilla.
http://sigrok.org/wiki/PulseView
GNU General Public License v3.0
488 stars 156 forks source link

UI: Move show_session_error to signals #57

Closed depili closed 1 year ago

depili commented 1 year ago

Before various capture error handlers called Mainwindow::show_session_error() directly, and thus outside of the main UI thread. Qt widgets aren't thread- safe and thus this resulted in crashes or freezes at least on OSX and sometimes on linux

This patch moves the error reporting from the sampling thread into Qt signals so that the widgets are created in the main thread.

depili commented 1 year ago

And sorry, had two whitespace errors in the patch, force pushed and corrected them

depili commented 1 year ago

Details are in the sigrok bugzilla: https://sigrok.org/bugzilla/show_bug.cgi?id=1811

depili commented 1 year ago

Added fixup commit to insert a trailing empty line after the MainWindow::on_session_error_raised() implementation to keep the original layout.

depili commented 1 year ago

Merged into upstream repo as ae8dd8753ec0804f9c87938c13b082f8f39b05b0 Will eventually be synced to github also.

https://sigrok.org/gitaction/pulseview.git/3903edb..ae8dd87 for the upstream merge