# HG changeset patch # User John W. Eaton # Date 1571184123 14400 # Node ID 1a4defb4dfc28b97ea77d6e9a65c53804fab0181 # Parent 5a0543de1e47a0bfb62ab8581111c92ea20df86c call quit on main thread in handle_octave_finished (bug #50025, #56952) * octave-qobject.cc (octave_qobject::octave_qobject): Don't connect m_interpreter_qobj->octave_finished_signal to m_main_thread->quit slot. (octave_qobject::handle_octave_finished): Call m_main_thread->quit directly here on all systems, not just MacOS. diff -r 5a0543de1e47 -r 1a4defb4dfc2 libgui/src/octave-qobject.cc --- a/libgui/src/octave-qobject.cc Wed Oct 09 14:35:03 2019 +0200 +++ b/libgui/src/octave-qobject.cc Tue Oct 15 20:02:03 2019 -0400 @@ -141,11 +141,6 @@ connect (m_interpreter_qobj, SIGNAL (octave_finished_signal (int)), this, SLOT (handle_octave_finished (int))); -#if ! defined (Q_OS_MAC) - connect (m_interpreter_qobj, SIGNAL (octave_finished_signal (int)), - m_main_thread, SLOT (quit (void))); -#endif - connect (m_main_thread, SIGNAL (finished (void)), m_main_thread, SLOT (deleteLater (void))); @@ -209,8 +204,10 @@ #if defined (Q_OS_MAC) // fprintf to stderr is needed by macOS, for poorly-understood reasons. fprintf (stderr, "\n"); +#endif + m_main_thread->quit (); -#endif + qApp->exit (exit_status); }