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:
+11
-6
@@ -16,15 +16,18 @@
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
class ChannelManager;
|
||||
class Resources;
|
||||
class EmoteManager;
|
||||
class WindowManager;
|
||||
|
||||
class IrcManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static IrcManager &getInstance()
|
||||
{
|
||||
return instance;
|
||||
}
|
||||
IrcManager(ChannelManager &_channelManager, Resources &_resources, EmoteManager &_emoteManager,
|
||||
WindowManager &_windowManager);
|
||||
|
||||
static const QString defaultClientId;
|
||||
|
||||
@@ -48,8 +51,10 @@ public:
|
||||
void setUser(const twitch::TwitchUser &account);
|
||||
|
||||
private:
|
||||
static IrcManager instance;
|
||||
IrcManager();
|
||||
ChannelManager &channelManager;
|
||||
Resources &resources;
|
||||
EmoteManager &emoteManager;
|
||||
WindowManager &windowManager;
|
||||
|
||||
// variables
|
||||
twitch::TwitchUser _account;
|
||||
|
||||
Reference in New Issue
Block a user