Mercurial > octave
diff libgui/src/workspace-view.h @ 27620:45bb5bbaf291
don't use singleton pattern for resource manager in GUI
Move ownership of the resource_manager object to the base_qobject
class. Store reference to resource_manager object as a member
variable in most objects that need to access it. Eliminate static
member functions in resource_managar class. Provide a
get_resource_manager method in the base_qboject class and a
global __get_resource_manager__ function for those instances where we
can't easily provide local access to the resource_manager object.
There are many changes to many files, but most are straightforward.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 01 Nov 2019 18:16:49 -0400 |
parents | 0495b64288f7 |
children | 8b6e928e0705 |
line wrap: on
line diff
--- a/libgui/src/workspace-view.h Sat Nov 02 15:24:14 2019 -0400 +++ b/libgui/src/workspace-view.h Fri Nov 01 18:16:49 2019 -0400 @@ -39,13 +39,15 @@ namespace octave { + class resource_manager; + class workspace_view : public octave_dock_widget { Q_OBJECT public: - workspace_view (QWidget *parent = nullptr); + workspace_view (QWidget *parent, resource_manager& rmgr); ~workspace_view (void) = default;