Mercurial > octave
diff libgui/src/m-editor/octave-qscintilla.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/m-editor/octave-qscintilla.h Sat Nov 02 15:24:14 2019 -0400 +++ b/libgui/src/m-editor/octave-qscintilla.h Fri Nov 01 18:16:49 2019 -0400 @@ -36,13 +36,15 @@ namespace octave { + class resource_manager; + class octave_qscintilla : public QsciScintilla { Q_OBJECT public: - octave_qscintilla (QWidget *p); + octave_qscintilla (QWidget *p, resource_manager& rmgr); ~octave_qscintilla (void) = default; @@ -124,6 +126,8 @@ void auto_close (int auto_endif, int l, const QString& line, QString& first_word); + resource_manager& m_resource_manager; + QString m_word_at_cursor; QString m_selection;