Perform initial refactoring work

Things that were once singletons are no longer singletons, but are
instead stored in the "Application" singleton

Some singletons still remain, and some renaming/renamespacing is left
This commit is contained in:
Rasmus Karlsson
2018-04-27 22:11:19 +02:00
parent 32b6417a55
commit ae26b835b6
78 changed files with 850 additions and 773 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
#include "twitchserver.hpp"
#include "application.hpp"
#include "providers/twitch/ircmessagehandler.hpp"
#include "providers/twitch/twitchaccount.hpp"
#include "providers/twitch/twitchhelpers.hpp"
@@ -23,7 +24,7 @@ TwitchServer::TwitchServer()
{
qDebug() << "init TwitchServer";
AccountManager::getInstance().Twitch.userChanged.connect(
getApp()->accounts->Twitch.userChanged.connect(
[this]() { util::postToThread([this] { this->connect(); }); });
}
@@ -35,7 +36,7 @@ TwitchServer &TwitchServer::getInstance()
void TwitchServer::initializeConnection(IrcConnection *connection, bool isRead, bool isWrite)
{
std::shared_ptr<TwitchAccount> account = AccountManager::getInstance().Twitch.getCurrent();
std::shared_ptr<TwitchAccount> account = getApp()->accounts->Twitch.getCurrent();
qDebug() << "logging in as" << account->getUserName();