Mercurial > octave
diff libgui/src/qt-interpreter-events.cc @ 29796:a0fce019cd1f
additional reorganization of signal/slot connections in main_window class
* main-window.cc (main_window::adopt_editor_widget):
Set m_editor_menubar and m_active_editor and call
m_editor_window->enable_menu_shortcuts here instead of in main_window
constructor.
(main_window::adopt_dock_widgets): Initialize m_previous_dock here
instead of in main_window constructor.
(main_window::adopt_file_browser_widget): Connect file browser signals
to main window slots here instead of in main_window::construct.
(main_window::adopt_editor_widget): Connect file_editor/main_window
signals/slots here instead of in main_window::construct. Connect
qt_link signals to file_editorhere instead of in
main_window::construct_qt_link.
(main_window::make_dock_widget_connections): Connect
QApplication::aboutToQuit signal to dock widget save_settings slot
here instead of in main_window::construct.
* octave-qobject.cc (base_qobject::terminal_widget): Connect
interpreter_output and update_prompt slots to qt_link signals here
instead of in main_window::construct_qt_link.
(base_qobject::file_browser_widget): Connect update_octave_directory
slot to qt_link signal here instead of in main_window::construct_qt_link.
* octave-qobject.h (base_qobject::have_terminal_window): New function.
* qt-interpreter-events.cc (qt_interpreter_events::interpreter_output,
qt_interpreter_events::display_exception): Use
m_octave_qobj.have_terminal_window instead of gui_running to choose
whether to emit signal or write directly to output stream.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 21 Jun 2021 14:51:13 -0400 |
parents | b4d2fa28d1d4 |
children | a946d742fb97 |
line wrap: on
line diff
--- a/libgui/src/qt-interpreter-events.cc Mon Jun 21 15:34:29 2021 +0900 +++ b/libgui/src/qt-interpreter-events.cc Mon Jun 21 14:51:13 2021 -0400 @@ -485,7 +485,7 @@ void qt_interpreter_events::interpreter_output (const std::string& msg) { if (m_octave_qobj.experimental_terminal_widget () - && m_octave_qobj.gui_running ()) + && m_octave_qobj.have_terminal_window ()) emit interpreter_output_signal (QString::fromStdString (msg)); else { @@ -498,7 +498,7 @@ bool beep) { if (m_octave_qobj.experimental_terminal_widget () - && m_octave_qobj.gui_running ()) + && m_octave_qobj.have_terminal_window ()) { std::ostringstream buf; ee.display (buf);