diff libgui/src/m-editor/file-editor.cc @ 28788:aba2c4eadb83

add functions of loaded packages to auto-completion list (bug #56207) * file-editor-tab.cc (update_lexer_settings): add boolean argument for updating apis but no other settings, clear current apis entries before adding all current functions and keywords * file-editor-tab.h: (update_lexer_settings): add boolean argument for updating apis but no other settings and define as slot * file-editor.cc (make_file_editor_tab): connect new main window signal for updating auto completion word lists with the slot in file_editor_tab * main-window.cc (construct_octave_qt_link): connect new qt-link signal for updating auto completion word lists with the related new main window signal * main-window.h: new signal for word list update * qt-interpreter-events.cc (update_gui_lexer): new method emitting signal for updateing the auto completion word list * qt-interpreter-events.h: new method update_gui_lexer and new signal update_gui_lexer_signal * event-manager.cc (__event_manager_update_gui_lexer__): new function for requesting an update of the auto completion worf lists * event-manager.h (void update_gui_lexer): new method calling the virtual methos which is re-implemented in qt event manager * load_packages_and_dependencies.m: call __event_manager_update_gui_lexer__ after laoding a package if gui is running * unload_packages.m: call __event_manager_update_gui_lexer__ after unloading a packages if gui is running
author Torsten Lilge <ttl-octave@mailbox.org>
date Thu, 24 Sep 2020 20:49:43 +0200
parents faf144a49db8
children 82ccc4e69ba3
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor.cc	Wed Sep 23 21:23:32 2020 +0200
+++ b/libgui/src/m-editor/file-editor.cc	Thu Sep 24 20:49:43 2020 +0200
@@ -2408,7 +2408,7 @@
     connect (f, SIGNAL (set_focus_editor_signal (QWidget*)),
              this, SLOT (set_focus (QWidget*)));
 
-    // Signals from the file_editor non-trivial operations
+    // Signals from the file_editor or main-win non-trivial operations
     connect (this, SIGNAL (fetab_settings_changed (const gui_settings *)),
              f, SLOT (notice_settings (const gui_settings *)));
 
@@ -2419,6 +2419,9 @@
                                             bool)),
              f, SLOT (save_file (const QWidget*, const QString&, bool)));
 
+    connect (main_win (), SIGNAL (update_gui_lexer_signal (bool)),
+             f, SLOT (update_lexer_settings (bool)));
+
     // Signals from the file_editor trivial operations
     connect (this, SIGNAL (fetab_recover_from_exit (void)),
              f, SLOT (recover_from_exit (void)));