diff libgui/src/m-editor/file-editor-tab.cc @ 21310:fc6a9bd59094

backout changeset e8c3590da9ff
author Lachlan Andrew <lachlanbis@gmail.com>
date Sun, 14 Feb 2016 13:16:05 +1100
parents 40de9f8f23a6
children 718332a58d35
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc	Fri Feb 19 21:27:03 2016 -0800
+++ b/libgui/src/m-editor/file-editor-tab.cc	Sun Feb 14 13:16:05 2016 +1100
@@ -61,14 +61,14 @@
 #include <QDialogButtonBox>
 #include <QPushButton>
 
-#include "file-ops.h"
-
 #include "resource-manager.h"
 #include "file-editor-tab.h"
 #include "file-editor.h"
 #include "octave-txt-lexer.h"
 #include "marker.h"
 
+#include "file-ops.h"
+
 #include "debug.h"
 #include "octave-qt-link.h"
 #include "version.h"
@@ -87,15 +87,13 @@
  */
 // Make parent null for the file editor tab so that warning
 // WindowModal messages don't affect grandparents.
-file_editor_tab::file_editor_tab (octave_dock_widget *editor,
-                                  const QString& directory_arg)
+file_editor_tab::file_editor_tab (const QString& directory_arg)
 {
   _lexer_apis = 0;
   _is_octave_file = true;
   _lines_changed = false;
 
   _ced = directory_arg;
-  _main_win = static_cast<main_window*> (editor->parent ());
 
   _file_name = "";
   _file_system_watcher.setObjectName ("_qt_autotest_force_engine_poller");
@@ -335,7 +333,7 @@
   // Ensure editor line numbers match Octave core's line numbers.
   // Give users the option to save modifications if necessary.
   if (! unchanged_or_saved ()
-     || !(_main_win->get_octave_qt_link ()->file_in_path (info.file, info.dir)))
+     || !(octave_qt_link::file_in_path (info.file, info.dir)))
     return;
 
   // Search for previous condition.  FIXME -- is there a more direct way?
@@ -929,7 +927,7 @@
   bp_table::intmap line_info;
   line_info[0] = info.line;
 
-  if (_main_win->get_octave_qt_link ()->file_in_path (info.file, info.dir))
+  if (octave_qt_link::file_in_path (info.file, info.dir))
     bp_table::add_breakpoint (info.function_name, line_info, info.condition);
 }
 
@@ -939,14 +937,14 @@
   bp_table::intmap line_info;
   line_info[0] = info.line;
 
-  if (_main_win->get_octave_qt_link ()->file_in_path (info.file, info.dir))
+  if (octave_qt_link::file_in_path (info.file, info.dir))
     bp_table::remove_breakpoint (info.function_name, line_info);
 }
 
 void
 file_editor_tab::remove_all_breakpoints_callback (const bp_info& info)
 {
-  if (_main_win->get_octave_qt_link ()->file_in_path (info.file, info.dir))
+  if (octave_qt_link::file_in_path (info.file, info.dir))
     bp_table::remove_all_breakpoints_in_file (info.function_name, true);
 }