comparison 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
comparison
equal deleted inserted replaced
15403:7b69cd89868c 15425:8ae34ffe5c1b
112 void debug_step_into (); 112 void debug_step_into ();
113 void debug_step_over (); 113 void debug_step_over ();
114 void debug_step_out (); 114 void debug_step_out ();
115 void debug_quit (); 115 void debug_quit ();
116 116
117 void read_settings ();
118 void write_settings ();
119
117 protected: 120 protected:
118 void closeEvent (QCloseEvent * closeEvent); 121 void closeEvent (QCloseEvent * closeEvent);
119 void read_settings ();
120 void write_settings ();
121 122
122 private: 123 private:
123 void construct (); 124 void construct ();
124 void establish_octave_link (); 125 void establish_octave_link ();
125 126