diff libgui/src/m-editor/file-editor.h @ 20995:aab7a3c7168e

edit a file from an error message in the terminal (bug #35619) * QTerminal.cc (handleCustomContextMenuRequested): move slot for the context menu from header file, detect an error location by regular expressions; (edit_file): slot context menu entry for editing a file in an error message * QTerminal.h: new signal for editing a file from an error message, slot handleCustomContextMenuRequested moved into QTerminal.cc, new edit action in the context menu, new slot for context menu entry, connect new edit signal to related slot in the main window * file-editor-tab.cc (handle_context_menu_edit): only keep searching for an embedded function, move the rest of the search into the editor, called via a new signal; (goto_line): center the new line in all cases * file-editor-tab.h: new signal for editing an m-file * file-editor.cc (handle_edit_mfile_request): partly moved from file-editor-tab; (construct): connect new signals from file-editor-tab and from main window to the new slot for searching and editing an m-file * file-editor.h: new slot for searching and editing an m-file * main-window.cc (edit_mfile): new slot for editing an m-file, just emitting the signal for the editor * main-window.h: new slot and new signal for editing an m-file
author Torsten <ttl@justmail.de>
date Mon, 28 Dec 2015 16:44:10 +0100
parents 73e92fca3c78
children 1c91ff4cf9ec
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor.h	Mon Dec 28 12:10:05 2015 +0100
+++ b/libgui/src/m-editor/file-editor.h	Mon Dec 28 16:44:10 2015 +0100
@@ -235,6 +235,8 @@
   void handle_delete_debugger_pointer_request (const QString& file, int line);
   void handle_update_breakpoint_marker_request (bool insert,
                                                 const QString& file, int line);
+  void handle_edit_mfile_request (const QString& name, const QString& file,
+                                  const QString& curr_dir, int line);
 
   void handle_edit_file_request (const QString& file);