Mercurial > hg > octave-shane
changeset 15387:f9ee3befcd6b
handle event deletion in octave_link class, not in event handler functions
* history-dockwidget.cc (history_dock_widget::event_accepted,
history_dock_widget::event_reject): Don't delete event here.
file-editor-tab.cc (file_editor_tab::event_accepted,
file_editor_tab::event_reject): Likewise.
main-window.cc (main_window::event_accepted,
main_window::event_reject): Likewise.
octave-adapter/octave-link.cc (octave_link::event_accepted,
octave_link::event_reject): Likewise.
workspace-model.cc (workspace_model::event_accepted,
workspace_model::event_reject): Likewise.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 14 Sep 2012 09:49:13 -0400 |
parents | 5546fe4dd77f |
children | 24b5348d38e7 |
files | libgui/src/history-dockwidget.cc libgui/src/m-editor/file-editor-tab.cc libgui/src/main-window.cc libgui/src/octave-adapter/octave-link.cc libgui/src/workspace-model.cc |
diffstat | 5 files changed, 2 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/history-dockwidget.cc +++ b/libgui/src/history-dockwidget.cc @@ -85,13 +85,11 @@ // Post a new update event in a given time. This prevents flooding the // event queue. _update_history_model_timer.start (); - delete e; } void history_dock_widget::event_reject (octave_event *e) { - delete e; } void
--- a/libgui/src/m-editor/file-editor-tab.cc +++ b/libgui/src/m-editor/file-editor-tab.cc @@ -143,8 +143,6 @@ Q_UNUSED (rabe); _edit_area->markerDeleteAll (breakpoint); } - - delete e; } void @@ -154,7 +152,6 @@ { // Running file failed. } - delete e; } void
--- a/libgui/src/main-window.cc +++ b/libgui/src/main-window.cc @@ -61,13 +61,11 @@ // After clearing the history, we need to reset the model. _history_dock_widget->reset_model (); } - delete e; } void main_window::event_reject (octave_event *e) { - delete e; } void
--- a/libgui/src/octave-adapter/octave-link.cc +++ b/libgui/src/octave-adapter/octave-link.cc @@ -120,6 +120,8 @@ e->accept (); else e->reject (); + + delete e; } event_queue_mutex->unlock (); @@ -159,13 +161,11 @@ void octave_link::event_accepted (octave_event *e) { - delete e; } void octave_link::event_reject (octave_event *e) { - delete e; } bool
--- a/libgui/src/workspace-model.cc +++ b/libgui/src/workspace-model.cc @@ -118,13 +118,11 @@ // Post a new event in a given time. // This prevents flooding the event queue when no events are being processed. _update_workspace_model_timer.start (); - delete e; } void workspace_model::event_reject (octave_event *e) { - delete e; } QModelIndex