refactor: Pass interfaces::Node references to OptionsModel constructor

Will allow OptionsModel to read/write settings to the node settings.json
file and share settings with the node, instead of storing them
externally in QSettings.

Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
This commit is contained in:
Ryan Ofsky
2019-04-29 15:29:00 -04:00
parent 0de36941ec
commit 31122aa979
7 changed files with 18 additions and 20 deletions

View File

@@ -30,8 +30,8 @@ const char *DEFAULT_GUI_PROXY_HOST = "127.0.0.1";
static const QString GetDefaultProxyAddress();
OptionsModel::OptionsModel(QObject *parent, bool resetSettings) :
QAbstractListModel(parent)
OptionsModel::OptionsModel(interfaces::Node& node, QObject *parent, bool resetSettings) :
QAbstractListModel(parent), m_node{node}
{
Init(resetSettings);
}