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
+7 -8
View File
@@ -6,13 +6,12 @@
namespace chatterino {
class ChannelManager;
class WindowManager
{
public:
static WindowManager &getInstance()
{
return instance;
}
explicit WindowManager(ChannelManager &_channelManager);
void layoutVisibleChatWidgets(Channel *channel = nullptr);
void repaintVisibleChatWidgets(Channel *channel = nullptr);
@@ -25,12 +24,12 @@ public:
void save();
private:
static WindowManager instance;
ChannelManager &channelManager;
WindowManager();
std::mutex windowMutex;
std::mutex _windowMutex;
widgets::MainWindow *_mainWindow;
// TODO(pajlada): Store as a value instead of a pointer
widgets::MainWindow *mainWindow = nullptr;
};
} // namespace chatterino