added debug logs and code to assert that we are in the gui thread

This commit is contained in:
fourtf
2018-04-26 18:10:26 +02:00
parent b176dc5295
commit d078ef5fe0
22 changed files with 81 additions and 13 deletions
+6 -3
View File
@@ -21,9 +21,10 @@ TwitchServer::TwitchServer()
, mentionsChannel(new Channel("/mentions", Channel::TwitchMentions))
, watchingChannel(Channel::getEmpty(), Channel::TwitchWatching)
{
AccountManager::getInstance().Twitch.userChanged.connect([this]() { //
util::postToThread([this] { this->connect(); });
});
qDebug() << "init TwitchServer";
AccountManager::getInstance().Twitch.userChanged.connect(
[this]() { util::postToThread([this] { this->connect(); }); });
}
TwitchServer &TwitchServer::getInstance()
@@ -36,6 +37,8 @@ void TwitchServer::initializeConnection(IrcConnection *connection, bool isRead,
{
std::shared_ptr<TwitchAccount> account = AccountManager::getInstance().Twitch.getCurrent();
qDebug() << "logging in as" << account->getUserName();
QString username = account->getUserName();
// QString oauthClient = account->getOAuthClient();
QString oauthToken = account->getOAuthToken();