diff libgui/src/main-window.cc @ 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 98e75f952a36
children 8000dacaea98
line wrap: on
line diff
--- a/libgui/src/main-window.cc	Mon Dec 28 12:10:05 2015 +0100
+++ b/libgui/src/main-window.cc	Mon Dec 28 16:44:10 2015 +0100
@@ -240,6 +240,12 @@
 {
   emit open_file_signal (file_name);
 }
+void
+
+main_window::edit_mfile (const QString& name, int line)
+{
+  emit edit_mfile_request (name, QString (), QString (), line);
+}
 
 void
 main_window::report_status_message (const QString& statusMessage)