diff libgui/src/m-editor/file-editor-tab.h @ 25923:a7511a1489b8

call octave functions with return value from GUI (bug #47585) * file-editor-tab.cc (update_breakpoints): new function using octave_cmd_builtin for calling dbstatus; (update_breakpoints_handler) slot for the signal from the worker thread going through the list of returned breakpoints and update the markers of the breakpoints which are related to the current file; (handle_octave_result): removed this stub * file-editor-tab.h: new method update_breakpoints, new slot update_breakpoints_handler * file-editor.cc (request_open_file): call update_breakpoints for the new editor tab after the file contents has been loaded * main-window.cc (main_window): register octave_value_list as meta type allowing to send this data type via queued signal/slot connections; (handle_load_workspace_request): update usage of octave_cmd_builtin according to its new parameter list * octave-cmd.cc (octave_cmd_builtin::execute): call builtin function with return value list, if nargout is not zero, emit the signal with the returned list; (octave_cmd_builtin::init_cmd_retval): method for connecting the return value signal with the slot given by the caller * octave-cmd.h: (octave_cmd_builtin): add nargout as well as receiver and handler of the return value signals slot to the parameter list, call method for connecting the signal with the given slot; (argout_signal): new signal for passing the return values to the caller thread
author Torsten <mttl@mailbox.org>
date Mon, 08 Oct 2018 20:41:31 +0200
parents b33d4fbce33e
children f73bcf1d0b5a
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.h	Mon Oct 08 10:27:32 2018 -0700
+++ b/libgui/src/m-editor/file-editor-tab.h	Mon Oct 08 20:41:31 2018 +0200
@@ -66,6 +66,8 @@
     static void reset_cancel (void) {_cancelled = false;}
     static bool was_cancelled (void) {return _cancelled;}
 
+    void update_breakpoints ();
+
   public slots:
 
     void update_window_title (bool modified);
@@ -148,8 +150,7 @@
     void handle_request_add_breakpoint (int line, const QString& cond);
     void handle_request_remove_breakpoint (int line);
 
-    void handle_octave_result (QObject *requester, QString& command,
-                               octave_value_list& result);
+    void update_breakpoints_handler (const octave_value_list& argout);
 
   signals: