Huge refactor
- Remove some underscore-prefixes
- Start using this-> more
- Remove a few of the singletons (We pass references to managers to
things that need it now. Might not be much better, but for now
it works. It also shows what places might be slightly wrong
designed)
This commit is contained in:
@@ -18,8 +18,9 @@
|
||||
namespace chatterino {
|
||||
namespace widgets {
|
||||
|
||||
Notebook::Notebook(QWidget *parent)
|
||||
Notebook::Notebook(ChannelManager &_channelManager, QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, channelManager(_channelManager)
|
||||
, _addButton(this)
|
||||
, _settingsButton(this)
|
||||
, _userButton(this)
|
||||
@@ -47,7 +48,7 @@ Notebook::Notebook(QWidget *parent)
|
||||
NotebookPage *Notebook::addPage(bool select)
|
||||
{
|
||||
auto tab = new NotebookTab(this);
|
||||
auto page = new NotebookPage(this, tab);
|
||||
auto page = new NotebookPage(this->channelManager, this, tab);
|
||||
|
||||
tab->show();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user