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:
Rasmus Karlsson
2017-06-13 21:13:58 +02:00
parent 55b04ee7eb
commit 59d383c161
37 changed files with 630 additions and 523 deletions
+6 -1
View File
@@ -17,6 +17,9 @@
#include <boost/signals2/connection.hpp>
namespace chatterino {
class ChannelManager;
namespace widgets {
// Each ChatWidget consists of three sub-elements that handle their own part of the chat widget:
@@ -34,7 +37,7 @@ class ChatWidget : public QWidget
Q_OBJECT
public:
ChatWidget(QWidget *parent = nullptr);
ChatWidget(ChannelManager &_channelManager, QWidget *parent = nullptr);
~ChatWidget();
std::shared_ptr<Channel> getChannel() const;
@@ -53,6 +56,8 @@ protected:
void paintEvent(QPaintEvent *) override;
private:
ChannelManager &channelManager;
void setChannel(std::shared_ptr<Channel> newChannel);
void detachChannel();