Mercurial > octave
comparison libgui/src/main-window.cc @ 31639:ca7d58406f82
eliminate unnecessary uses of octave_qobject in GUI classes
* BaseControl.cc, BaseControl.h, ButtonControl.cc, ButtonControl.h,
ButtonGroup.cc, ButtonGroup.h, Canvas.cc, Canvas.h,
CheckBoxControl.cc, CheckBoxControl.h, Container.cc, Container.h,
ContextMenu.cc, ContextMenu.h, EditControl.cc, EditControl.h,
Figure.cc, Figure.h, GLCanvas.cc, GLCanvas.h, ListBoxControl.cc,
ListBoxControl.h, Menu.cc, Menu.h, Object.cc, Object.h, Panel.cc,
Panel.h, PopupMenuControl.cc, PopupMenuControl.h,
PushButtonControl.cc, PushButtonControl.h, PushTool.cc, PushTool.h,
RadioButtonControl.cc, RadioButtonControl.h, SliderControl.cc,
SliderControl.h, Table.cc, Table.h, TextControl.cc, TextControl.h,
ToggleButtonControl.cc, ToggleButtonControl.h, ToggleTool.cc,
ToggleTool.h, ToolBar.cc, ToolBar.h, ToolBarButton.cc,
ToolBarButton.h, annotation-dialog.cc, annotation-dialog.h,
qt-graphics-toolkit.cc, qt-graphics-toolkit.h, command-widget.h,
community-news.cc, community-news.h, documentation-bookmarks.cc,
documentation-bookmarks.h, documentation.cc,
external-editor-interface.cc, external-editor-interface.h,
find-files-dialog.cc, find-files-dialog.h, graphics-init.cc,
graphics-init.h, interpreter-qobject.cc, file-editor.cc,
find-dialog.cc, find-dialog.h, main-window.cc, main-window.h,
news-reader.cc, news-reader.h, octave-qobject.cc, release-notes.cc,
resource-manager.cc, set-path-dialog.cc, set-path-dialog.h,
shortcut-manager.cc, shortcut-manager.h, welcome-wizard.cc,
welcome-wizard.h, workspace-model.cc:
Don't store references to octave_qobject in GUI classes where it is
no longer needed. Eliminate unnecessary octave_qobject constructor
arguments. Change all uses.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 04 Dec 2022 22:57:02 -0500 |
parents | 474e184321d3 |
children | 431f80aba37a |
comparison
equal
deleted
inserted
replaced
31638:474e184321d3 | 31639:ca7d58406f82 |
---|---|
98 m_command_window (nullptr), | 98 m_command_window (nullptr), |
99 m_history_window (nullptr), | 99 m_history_window (nullptr), |
100 m_file_browser_window (nullptr), | 100 m_file_browser_window (nullptr), |
101 m_editor_window (nullptr), | 101 m_editor_window (nullptr), |
102 m_workspace_window (nullptr), | 102 m_workspace_window (nullptr), |
103 m_external_editor (new external_editor_interface (this, m_octave_qobj)), | 103 m_external_editor (new external_editor_interface (this)), |
104 m_active_editor (m_external_editor), m_settings_dlg (nullptr), | 104 m_active_editor (m_external_editor), m_settings_dlg (nullptr), |
105 m_find_files_dlg (nullptr), m_set_path_dlg (nullptr), | 105 m_find_files_dlg (nullptr), m_set_path_dlg (nullptr), |
106 m_clipboard (QApplication::clipboard ()), | 106 m_clipboard (QApplication::clipboard ()), |
107 m_prevent_readline_conflicts (true), | 107 m_prevent_readline_conflicts (true), |
108 m_prevent_readline_conflicts_menu (false), | 108 m_prevent_readline_conflicts_menu (false), |
116 if (! settings.value (global_skip_welcome_wizard).toBool ()) | 116 if (! settings.value (global_skip_welcome_wizard).toBool ()) |
117 { | 117 { |
118 // Before wizard. | 118 // Before wizard. |
119 m_octave_qobj.config_translators (); | 119 m_octave_qobj.config_translators (); |
120 | 120 |
121 welcome_wizard welcomeWizard (m_octave_qobj); | 121 welcome_wizard welcomeWizard; |
122 | 122 |
123 if (welcomeWizard.exec () == QDialog::Rejected) | 123 if (welcomeWizard.exec () == QDialog::Rejected) |
124 exit (1); | 124 exit (1); |
125 | 125 |
126 settings.setValue (global_skip_welcome_wizard.key, QVariant (true)); | 126 settings.setValue (global_skip_welcome_wizard.key, QVariant (true)); |
1800 void main_window::handle_set_path_dialog_request (void) | 1800 void main_window::handle_set_path_dialog_request (void) |
1801 { | 1801 { |
1802 if (m_set_path_dlg) // m_set_path_dlg is a guarded pointer! | 1802 if (m_set_path_dlg) // m_set_path_dlg is a guarded pointer! |
1803 return; | 1803 return; |
1804 | 1804 |
1805 m_set_path_dlg = new set_path_dialog (this, m_octave_qobj); | 1805 m_set_path_dlg = new set_path_dialog (this); |
1806 | 1806 |
1807 m_set_path_dlg->setModal (false); | 1807 m_set_path_dlg->setModal (false); |
1808 m_set_path_dlg->setAttribute (Qt::WA_DeleteOnClose); | 1808 m_set_path_dlg->setAttribute (Qt::WA_DeleteOnClose); |
1809 m_set_path_dlg->show (); | 1809 m_set_path_dlg->show (); |
1810 | 1810 |
1836 void main_window::find_files (const QString& start_dir) | 1836 void main_window::find_files (const QString& start_dir) |
1837 { | 1837 { |
1838 | 1838 |
1839 if (! m_find_files_dlg) | 1839 if (! m_find_files_dlg) |
1840 { | 1840 { |
1841 m_find_files_dlg = new find_files_dialog (this, m_octave_qobj); | 1841 m_find_files_dlg = new find_files_dialog (this); |
1842 | 1842 |
1843 connect (m_find_files_dlg, &find_files_dialog::finished, | 1843 connect (m_find_files_dlg, &find_files_dialog::finished, |
1844 this, &main_window::find_files_finished); | 1844 this, &main_window::find_files_finished); |
1845 | 1845 |
1846 connect (m_find_files_dlg, &find_files_dialog::dir_selected, | 1846 connect (m_find_files_dlg, &find_files_dialog::dir_selected, |