diff libgui/src/main-window.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 00835323fb44
children 8000dacaea98
line wrap: on
line diff
--- a/libgui/src/main-window.h	Mon Dec 28 12:10:05 2015 +0100
+++ b/libgui/src/main-window.h	Mon Dec 28 16:44:10 2015 +0100
@@ -92,6 +92,7 @@
   void init_terminal_size_signal (void);
   void new_file_signal (const QString&);
   void open_file_signal (const QString&);
+  void edit_mfile_request (const QString&, const QString&, const QString&, int);
 
   void show_doc_signal (const QString&);
 
@@ -123,6 +124,7 @@
   void handle_undo_request (void);
   void new_file (const QString& commands = QString ());
   void open_file (const QString& file_name = QString ());
+  void edit_mfile (const QString&, int);
   void open_online_documentation_page (void);
   void display_release_notes (void);
   void load_and_display_community_news (int serial = -1);