Mercurial > octave
comparison libgui/src/files-dock-widget.cc @ 29782:02461b0ccc00
reduce dependence of files_dock_widget on Octave interpreter
* files-dock-widget.h, files-dock-widget.cc:
Don't include interpreter.h or load-save.h.
(files_dock_widget::modify_path_signal): Use QStringList to pass list
of directory names, not octave_value_list. Change all uses.
* main-window.h, main-window.cc (main_window::modify_path): Use
QStringList to pass list of directory names, not octave_value_list.
Change all uses.
* set-path-dialog.h, set-path-dialog.cc
(set_path_dialog::modify_path_signal): Use QStringList to pass list of
directory names, not octave_value_list. Change all uses.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 18 Jun 2021 01:20:46 -0400 |
parents | 9367cba2a6d5 |
children | 351dbe4da930 |
comparison
equal
deleted
inserted
replaced
29781:6cbd169e391b | 29782:02461b0ccc00 |
---|---|
49 #include "gui-preferences-global.h" | 49 #include "gui-preferences-global.h" |
50 #include "octave-qobject.h" | 50 #include "octave-qobject.h" |
51 #include "octave-qtutils.h" | 51 #include "octave-qtutils.h" |
52 #include "qt-interpreter-events.h" | 52 #include "qt-interpreter-events.h" |
53 | 53 |
54 #include "interpreter.h" | |
55 #include "load-save.h" | |
56 #include "oct-env.h" | 54 #include "oct-env.h" |
57 | 55 |
58 namespace octave | 56 namespace octave |
59 { | 57 { |
60 class FileTreeViewer : public QTreeView | 58 class FileTreeViewer : public QTreeView |
859 | 857 |
860 void files_dock_widget::contextmenu_add_to_path (bool, bool rm, bool subdirs) | 858 void files_dock_widget::contextmenu_add_to_path (bool, bool rm, bool subdirs) |
861 { | 859 { |
862 QList<QFileInfo> infos = get_selected_items_info (true); | 860 QList<QFileInfo> infos = get_selected_items_info (true); |
863 | 861 |
864 octave_value_list dir_list = ovl (); | 862 QStringList dir_list; |
865 | 863 |
866 for (int i = 0; i < infos.length (); i++) | 864 for (int i = 0; i < infos.length (); i++) |
867 dir_list.append (infos.at (i).absoluteFilePath ().toStdString ()); | 865 dir_list.append (infos.at (i).absoluteFilePath ()); |
868 | 866 |
869 if (infos.length () > 0) | 867 if (infos.length () > 0) |
870 emit modify_path_signal (dir_list, rm, subdirs); | 868 emit modify_path_signal (dir_list, rm, subdirs); |
871 } | 869 } |
872 | 870 |