Mercurial > octave
comparison libgui/src/terminal-dock-widget.cc @ 31087:9c0099048264
exp cmd widget: fix missing promt after error
* octave-qobject.cc (base_qobject::terminal_widget): connect signals
of interpreter events to terminal signals instead of slots
* qt-interpreter-events.cc (display_exception): emit signal for
new command line after exception message in eyp. terminal widget
* qt-interpreter-events.h: new signal new_command_line_signal
* terminal-dock-widget.cc (terminal_dock_widget): connect new
interpreter triggered signal to related slot in console;
(interpreter_output): removed, slot was only emitting a signal,
which is now directly connected to the first signal;
(update_prompt): dito
* terminal-dock-widget.h: new signal new_command_line_signal,
removed interpreter_output and update_prompt
author | Torsten Lilge <ttl-octave@mailbox.org> |
---|---|
date | Fri, 10 Jun 2022 18:02:23 +0200 |
parents | 0b402f523f09 |
children | 1a0756f7c90a |
comparison
equal
deleted
inserted
replaced
31086:d5696a4efa84 | 31087:9c0099048264 |
---|---|
64 connect (this, &terminal_dock_widget::interpreter_output_signal, | 64 connect (this, &terminal_dock_widget::interpreter_output_signal, |
65 widget, &command_widget::insert_interpreter_output); | 65 widget, &command_widget::insert_interpreter_output); |
66 | 66 |
67 connect (this, &terminal_dock_widget::execute_command_signal, | 67 connect (this, &terminal_dock_widget::execute_command_signal, |
68 con, &console::execute_command); | 68 con, &console::execute_command); |
69 | |
70 connect (this, &terminal_dock_widget::new_command_line_signal, | |
71 con, &console::new_command_line); | |
69 | 72 |
70 m_terminal = widget; | 73 m_terminal = widget; |
71 } | 74 } |
72 else | 75 else |
73 { | 76 { |
145 void terminal_dock_widget::notice_settings (const gui_settings *settings) | 148 void terminal_dock_widget::notice_settings (const gui_settings *settings) |
146 { | 149 { |
147 emit settings_changed (settings); | 150 emit settings_changed (settings); |
148 } | 151 } |
149 | 152 |
150 void terminal_dock_widget::interpreter_output (const QString& msg) | |
151 { | |
152 if (m_experimental_terminal_widget) | |
153 emit interpreter_output_signal (msg); | |
154 } | |
155 | |
156 void terminal_dock_widget::update_prompt (const QString& prompt) | |
157 { | |
158 if (m_experimental_terminal_widget) | |
159 emit update_prompt_signal (prompt); | |
160 } | |
161 | |
162 void terminal_dock_widget::init_command_prompt () | 153 void terminal_dock_widget::init_command_prompt () |
163 { | 154 { |
164 if (m_experimental_terminal_widget) | 155 if (m_experimental_terminal_widget) |
165 { | 156 { |
166 command_widget *cmd = get_command_widget (); | 157 command_widget *cmd = get_command_widget (); |