Mercurial > octave
diff libgui/src/terminal-dock-widget.cc @ 31222:1a0756f7c90a
disable experimental terminal widget when building without qscintilla
* command-widget.cc: inlcude into #if defined (HAVE_QSCINTILLA)
* main-window.cc: include command-widget.h only if HAVE_QSCINTILLA
* module.mk: only build moc-command-widget.cc if HAVE_QSCINTILLA
* octave-qobject.cc: include command-widget.h only if HAVE_QSCINTILLA,
(base_qobject::terminal_widget): use conditional compilation where
referring to new terminal widget
* terminal-dock-widget.cc: include command-widget.h only if HAVE_QSCINTILLA,
(terminal_dock_widget, init_command_prompt): use conditional compilation
where referring to new terminal widget
* terminal-dock-widget.h: use conditional compilation where referring to
new terminal widget Thu Sep 01 02:34:37 2022 +0200
* octave.cc (cmdline_options): only return true on experimental terminal
widget option if built with scintilla
author | Torsten Lilge <ttl-octave@mailbox.org> |
---|---|
date | Sat, 03 Sep 2022 00:18:49 +0200 |
parents | 9c0099048264 |
children | ad014fc78bd6 c6d54dd31a7e |
line wrap: on
line diff
--- a/libgui/src/terminal-dock-widget.cc Wed Aug 31 22:04:02 2022 +0200 +++ b/libgui/src/terminal-dock-widget.cc Sat Sep 03 00:18:49 2022 +0200 @@ -30,7 +30,9 @@ #include <QScreen> // This header is only needed for the new terminal widget. -#include "command-widget.h" +#if defined (HAVE_QSCINTILLA) +# include "command-widget.h" +#endif // This header is only needed for the old terminal widget. #include "QTerminal.h" @@ -52,6 +54,7 @@ // matter much if we will eventually be removing the old terminal. if (m_experimental_terminal_widget) { +#if defined (HAVE_QSCINTILLA) command_widget *widget = new command_widget (oct_qobj, this); console *con = widget->get_console (); @@ -71,6 +74,7 @@ con, &console::new_command_line); m_terminal = widget; +#endif } else { @@ -139,11 +143,13 @@ ? nullptr : dynamic_cast<QTerminal *> (m_terminal)); } +#if defined (HAVE_QSCINTILLA) command_widget * terminal_dock_widget::get_command_widget (void) { return (m_experimental_terminal_widget ? dynamic_cast<command_widget *> (m_terminal) : nullptr); } +#endif void terminal_dock_widget::notice_settings (const gui_settings *settings) { @@ -154,9 +160,11 @@ { if (m_experimental_terminal_widget) { +#if defined (HAVE_QSCINTILLA) command_widget *cmd = get_command_widget (); if (cmd) cmd->init_command_prompt (); +#endif } } }