Mercurial > hg > octave-nkf
diff libgui/src/m-editor/file-editor-tab.cc @ 19805:4b980842edba gui-release
clean up some signal-slot combinations in the editor
* file-editor-tab.cc (contructor): remove connections of signals for command
execution and for creating the context menu;
(execute_command_in_terminal, create_context_menu): related slots removed
* file-editor-tab.h: removed slots and signals that were emitted therein
* file-editor.cc (add_file_editor_tab): connect edit area signals directly
to the related slots without involving the editor tab
author | Torsten <ttl@justmail.de> |
---|---|
date | Thu, 22 Jan 2015 21:38:12 +0100 |
parents | d258070914ef |
children | 8ef79bc61d8a |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc +++ b/libgui/src/m-editor/file-editor-tab.cc @@ -82,21 +82,10 @@ _file_system_watcher.setObjectName ("_qt_autotest_force_engine_poller"); _edit_area = new octave_qscintilla (this); - // Connect signal for command execution to a slot of this tab which in turn - // emits a signal connected to the main window. - // Direct connection is not possible because tab's parent is null. - connect (_edit_area, - SIGNAL (execute_command_in_terminal_signal (const QString&)), - this, - SLOT (execute_command_in_terminal (const QString&))); - connect (_edit_area, - SIGNAL (cursorPositionChanged (int, int)), - this, - SLOT (handle_cursor_moved (int,int))); + connect (_edit_area, SIGNAL (cursorPositionChanged (int, int)), + this, SLOT (handle_cursor_moved (int,int))); - connect (_edit_area, SIGNAL (create_context_menu_signal (QMenu*)), - this, SLOT (create_context_menu (QMenu*))); connect (_edit_area, SIGNAL (context_menu_edit_signal (const QString&)), this, SLOT (handle_context_menu_edit (const QString&))); @@ -208,12 +197,6 @@ } void -file_editor_tab::execute_command_in_terminal (const QString& command) -{ - emit execute_command_in_terminal_signal (command); // connected to main window -} - -void file_editor_tab::handle_context_menu_edit (const QString& word_at_cursor) { // search for a subfunction in actual file (this is done at first because @@ -2089,12 +2072,6 @@ _col_indicator->setNum (col+1); } -void -file_editor_tab::create_context_menu (QMenu *menu) -{ - emit create_context_menu_tab_signal (menu); -} - QString file_editor_tab::get_function_name () {