diff libgui/src/main-window.cc @ 16424:ad052cdc89ad

use signal for octave_link::edit_file * main-window.h, main-window.cc (main_window::handle_edit_file_request): Delete. (main_window::construct): Delete signal connection from _octave_qt_event_listener::edit_file_signal to main_window::handle_edit_file_request. Connect _octave_qt_link::edit_file_signal to _file_editor::handle_edit_file_request. * qt-event-listener.h, qt-event-listener.cc (octave_qt_event_listener::edit_file): Delete. (octave_qt_event_listener::edit_file_signal): Delete. * octave-qt-link.cc (octave_qt_link::do_edit_file): Emit signal instead of using event listener. * octave-qt-link.h (octave_qt_link::edit_file_signal): New signal. * octave-event-listener.h (octave_event_listener::edit_file): Delete.
author John W. Eaton <jwe@octave.org>
date Thu, 04 Apr 2013 01:43:18 -0400
parents 04c4dd7fd3ce
children 8ff9006cedc3
line wrap: on
line diff
--- a/libgui/src/main-window.cc	Thu Apr 04 00:03:45 2013 -0400
+++ b/libgui/src/main-window.cc	Thu Apr 04 01:43:18 2013 -0400
@@ -520,14 +520,6 @@
 }
 
 void
-main_window::handle_edit_file_request (const QString& file)
-{
-#ifdef HAVE_QSCINTILLA
-  _file_editor->handle_edit_file_request (file);
-#endif
-}
-
-void
 main_window::debug_continue ()
 {
   octave_link::post_event (this, &main_window::debug_continue_callback);
@@ -1205,11 +1197,6 @@
            this,
            SLOT (handle_update_dbstop_marker_request (bool, const QString&, int)));
 
-  connect (_octave_qt_event_listener,
-           SIGNAL (edit_file_signal (const QString&)),
-           this,
-           SLOT (handle_edit_file_request(const QString&)));
-
   // FIXME -- is it possible to eliminate the event_listenter?
 
   _octave_qt_link = new octave_qt_link ();
@@ -1219,6 +1206,11 @@
            _file_editor,
            SLOT (handle_update_dbstop_marker_request (bool, const QString&, int)));
 
+  connect (_octave_qt_link,
+           SIGNAL (edit_file_signal (const QString&)),
+           _file_editor,
+           SLOT (handle_edit_file_request (const QString&)));
+
   octave_link::connect_link (_octave_qt_link);
 
   octave_link::register_event_listener (_octave_qt_event_listener);