Mercurial > hg > octave-lyh
diff libgui/src/main-window.h @ 15425:8ae34ffe5c1b
Retain QsciAPIs lexer_api as part of lexer_octave_gui object (bug #37359)
This way, it may be deleted upon deconstruction and not cause
segmentation fault at startup
* file-editor-tab.cc, file-editor-tab.h
(file_editor_tab::update_tracked_file): Delete.
(file_editor_tab::set_file_name): Rather than clear whole list, just
subtract out the old file name then add the new name.
(file_editor_tab::load_file): Remove update_tracked_file, it's part
of set_file_name. (file_editor_tab::file_has_changed): Remove
update_tracked_file, it's part of set_file_name.
(file_editor_tab::save_file): Move file close before set_file_name
so watcher doesn't notice. Remove inelegant code that solved this by
clearing watcher files.
* lexer-octave-gui.cc, file-editor-tab.cc
(file_editor_tab::update_lexer, lexer_octave_gui::lexer_octave_gui,
lexer_octave_gui : public QsciLexer): Move all the lexer preparatory
code to the constructor so that lexer_api can be retained as part of
object. (lexer_octave_gui::~lexer_octave_gui): Make destructor
non-virtual and delete lexer_gui when done.
* octave-gui.cc, main-window-h, main-window.cc, file-editor.cc
(octave_start_gui, file_editor::construct): Move read_settings from
constructor to after construction in octave_start_gui so that no
signal occur referencing a partially constructed object.
* file-editor.cc (file_editor::construct): Tidy code.
author | Daniel J Sebald <daniel.sebald@ieee.org> |
---|---|
date | Thu, 20 Sep 2012 04:08:53 -0500 |
parents | 7f423c6111c6 |
children | c9c79d4a0a00 |
line wrap: on
line diff
--- a/libgui/src/main-window.h +++ b/libgui/src/main-window.h @@ -114,10 +114,11 @@ void debug_step_out (); void debug_quit (); + void read_settings (); + void write_settings (); + protected: void closeEvent (QCloseEvent * closeEvent); - void read_settings (); - void write_settings (); private: void construct ();