Mercurial > octave
changeset 27639:a18081db8fa3
eliminate some unused signals and slots in the file editor
The following signals and slots were only ultimately triggered by
file_editor::fetab_file_name_query, and that is no longer used.
* file-editor-tab.h, file-editor-tab.cc
(file_editor_tab::file_name_query): Delete slot and all uses.
(file_editor_tab::add_filename_to_list,
file_editor_tab::file_name_query): Delete signalx and all uses.
* file-editor.h, file-editor.cc
(file_editor::handle_add_filename_to_list): Delete slot and all uses.
(file_editor::struct tab_info): Delete declaration.
(file_editor::editor_tab_map_iterator,
file_editor::editor_tab_map_const_iterator): Delete typedefs.
(file_editor::fetab_file_name_query): Delete now unused signal.
(file_editor::handle_add_filename_to_list): Delete slot and all uses.
(file_editor::m_editor_tab_map): Delete unused data member.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 05 Nov 2019 00:44:16 -0500 |
parents | 95534a0ad14c |
children | 2a03fa568feb |
files | libgui/src/m-editor/file-editor-tab.cc libgui/src/m-editor/file-editor-tab.h libgui/src/m-editor/file-editor.cc libgui/src/m-editor/file-editor.h |
diffstat | 4 files changed, 0 insertions(+), 45 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc Tue Nov 05 00:27:53 2019 -0500 +++ b/libgui/src/m-editor/file-editor-tab.cc Tue Nov 05 00:44:16 2019 -0500 @@ -2957,17 +2957,6 @@ emit editor_state_changed (m_copy_available, m_is_octave_file); } - void file_editor_tab::file_name_query (const QWidget *ID) - { - // A zero (null pointer) means that all file editor tabs - // should respond, otherwise just the desired file editor tab. - if (ID != this && ID != nullptr) - return; - - // This list also includes windows with name "" - emit add_filename_to_list (m_file_name, m_encoding, this); - } - void file_editor_tab::handle_file_reload_answer (int decision) { if (decision == QMessageBox::Yes)
--- a/libgui/src/m-editor/file-editor-tab.h Tue Nov 05 00:27:53 2019 -0500 +++ b/libgui/src/m-editor/file-editor-tab.h Tue Nov 05 00:44:16 2019 -0500 @@ -77,7 +77,6 @@ void editor_state_changed (bool copy_available, bool is_octave_file); void set_focus_editor_signal (QWidget *); void tab_remove_request (void); - void add_filename_to_list (const QString&, const QString&, QWidget *); void mru_add_file (const QString& file_name, const QString& encoding); void editor_check_conflict_save (const QString& saveFileName, bool remove_on_success); @@ -142,9 +141,6 @@ // Change to a different editor tab by identifier tag. void change_editor_state (const QWidget *ID); - // Simply transmit filename. - void file_name_query (const QWidget *ID); - void handle_toplevel_changed (bool); void set_focus (const QWidget *ID); void set_current_directory (const QString& dir);
--- a/libgui/src/m-editor/file-editor.cc Tue Nov 05 00:27:53 2019 -0500 +++ b/libgui/src/m-editor/file-editor.cc Tue Nov 05 00:44:16 2019 -0500 @@ -867,14 +867,6 @@ } - void file_editor::handle_add_filename_to_list (const QString& fileName, - const QString& encoding, QWidget *ID) - { - // Should we allow multiple tabs for a single file? - m_editor_tab_map[fileName].fet_ID = ID; - m_editor_tab_map[fileName].encoding = encoding; - } - // context menu of edit area void file_editor::active_tab_changed (int index) { @@ -2247,12 +2239,6 @@ connect (f, SIGNAL (tab_remove_request ()), this, SLOT (handle_tab_remove_request ())); - connect (f, SIGNAL (add_filename_to_list (const QString&, - const QString&, QWidget*)), - this, SLOT (handle_add_filename_to_list (const QString&, - const QString&, - QWidget*))); - connect (f, SIGNAL (editor_check_conflict_save (const QString&, bool)), this, SLOT (check_conflict_save (const QString&, bool))); @@ -2281,9 +2267,6 @@ connect (this, SIGNAL (fetab_change_request (const QWidget*)), f, SLOT (change_editor_state (const QWidget*))); - connect (this, SIGNAL (fetab_file_name_query (const QWidget*)), - f, SLOT (file_name_query (const QWidget*))); - connect (this, SIGNAL (fetab_save_file (const QWidget*, const QString&, bool)), f, SLOT (save_file (const QWidget*, const QString&, bool)));
--- a/libgui/src/m-editor/file-editor.h Tue Nov 05 00:27:53 2019 -0500 +++ b/libgui/src/m-editor/file-editor.h Tue Nov 05 00:44:16 2019 -0500 @@ -69,15 +69,6 @@ public: - struct tab_info - { - QWidget *fet_ID; - QString encoding; - }; - - typedef std::map<QString, tab_info>::iterator editor_tab_map_iterator; - typedef std::map<QString, tab_info>::const_iterator editor_tab_map_const_iterator; - // struct that allows to sort with respect to the tab index struct session_data { @@ -129,7 +120,6 @@ void fetab_toplevel_changed (bool); void fetab_settings_changed (const gui_settings *settings); void fetab_change_request (const QWidget *ID); - void fetab_file_name_query (const QWidget *ID); // Save is a ping-pong type of communication void fetab_save_file (const QWidget *ID, const QString& fileName, bool remove_on_success); @@ -257,8 +247,6 @@ bool modified); void handle_tab_close_request (int index); void handle_tab_remove_request (void); - void handle_add_filename_to_list (const QString& fileName, - const QString& encoding, QWidget *ID); void active_tab_changed (int index); void handle_editor_state_changed (bool enableCopy, bool is_octave_file); void handle_mru_add_file (const QString& file_name, const QString& encoding); @@ -348,7 +336,6 @@ QMenu * add_menu (QMenuBar *p, QString text); int m_number_of_tabs; - std::map<QString, tab_info> m_editor_tab_map; QHash<QMenu*, QStringList> m_hash_menu_text; QString m_ced;