Mercurial > octave
diff libgui/qterminal/libqterminal/QTerminal.h @ 29691:67eccd062618
fix calling documentations from terminal and editor
* QTerminal.cc (create): pass base_qobject to the created terminal;
(doc_on_expression): replace emitting a signal by calling
the interpreter event show_documentation_window;
(construct): remove obsolete signal connection
* QTerminal.h: QTerminal with base_qobject as additional argument,
new class variable m_octave_qobj
* QUnixTerminalImpl.cpp (QUnixTerminalImpl): new argument base_qobject
* QUnixTerminalImpl.h: dito
* QWinTerminalImpl.cpp (QWinTerminalImpl): new argument base_qobject
* QWinTerminalImpl.h: dito
* file-editor.cc (make_file_editor_tab): remove obsolete signal connection
* octave-qscintilla.cc (contextmenu_help_doc): replace emitting a signal
by calling the interpreter
author | Torsten Lilge <ttl-octave@mailbox.org> |
---|---|
date | Tue, 18 May 2021 22:17:34 +0200 |
parents | ca1cc1bca9cb |
children | 5154c91e0d98 |
line wrap: on
line diff
--- a/libgui/qterminal/libqterminal/QTerminal.h Tue May 18 09:08:45 2021 -0400 +++ b/libgui/qterminal/libqterminal/QTerminal.h Tue May 18 22:17:34 2021 +0200 @@ -34,6 +34,7 @@ // for the signal/slot macros. Could maybe change later when using // Qt5-style signal/slot connections. #include "gui-settings.h" + using octave::gui_settings; namespace octave @@ -137,12 +138,15 @@ protected: - QTerminal (QWidget *xparent = nullptr) : QWidget (xparent) { } + QTerminal (octave::base_qobject& oct_qobj, QWidget *xparent = nullptr) + : QWidget (xparent), m_octave_qobj (oct_qobj) { } void construct (octave::base_qobject& oct_qobj, QWidget *xparent); private: + octave::base_qobject& m_octave_qobj; + QMenu *_contextMenu; QAction * _copy_action; QAction * _paste_action;