ran clang-format on all files

This commit is contained in:
fourtf
2018-06-26 17:20:03 +02:00
parent 6ee1fc303e
commit 08e552f5f6
63 changed files with 175 additions and 200 deletions
+2 -3
View File
@@ -140,8 +140,7 @@ void IrcMessageHandler::handleClearChatMessage(Communi::IrcMessage *message)
auto chan = app->twitch.server->getChannelOrEmpty(chanName);
if (chan->isEmpty()) {
Log("[IrcMessageHandler:handleClearChatMessage] Twitch channel {} not found",
chanName);
Log("[IrcMessageHandler:handleClearChatMessage] Twitch channel {} not found", chanName);
return;
}
@@ -312,7 +311,7 @@ void IrcMessageHandler::handleNoticeMessage(Communi::IrcNoticeMessage *message)
if (channel->isEmpty()) {
Log("[IrcManager:handleNoticeMessage] Channel {} not found in channel manager ",
channelName);
channelName);
return;
}
+5 -6
View File
@@ -507,8 +507,8 @@ void PubSub::unlistenAllModerationActions()
}
}
void PubSub::listenToChannelModerationActions(
const QString &channelID, std::shared_ptr<TwitchAccount> account)
void PubSub::listenToChannelModerationActions(const QString &channelID,
std::shared_ptr<TwitchAccount> account)
{
assert(!channelID.isEmpty());
assert(account != nullptr);
@@ -527,8 +527,7 @@ void PubSub::listenToChannelModerationActions(
this->listenToTopic(topic, account);
}
void PubSub::listenToTopic(const std::string &topic,
std::shared_ptr<TwitchAccount> account)
void PubSub::listenToTopic(const std::string &topic, std::shared_ptr<TwitchAccount> account)
{
auto message = createListenMessage({topic}, account);
@@ -581,7 +580,7 @@ void PubSub::onMessage(websocketpp::connection_hdl hdl, WebsocketMessagePtr webs
if (!res) {
Log("Error parsing message '{}' from PubSub: {}", payload,
rapidjson::GetParseError_En(res.Code()));
rapidjson::GetParseError_En(res.Code()));
return;
}
@@ -713,7 +712,7 @@ void PubSub::handleMessageResponse(const rapidjson::Value &outerData)
if (!res) {
Log("Error parsing message '{}' from PubSub: {}", payload,
rapidjson::GetParseError_En(res.Code()));
rapidjson::GetParseError_En(res.Code()));
return;
}
+3 -4
View File
@@ -121,14 +121,13 @@ public:
void unlistenAllModerationActions();
void listenToChannelModerationActions(
const QString &channelID, std::shared_ptr<TwitchAccount> account);
void listenToChannelModerationActions(const QString &channelID,
std::shared_ptr<TwitchAccount> account);
std::vector<std::unique_ptr<rapidjson::Document>> requests;
private:
void listenToTopic(const std::string &topic,
std::shared_ptr<TwitchAccount> account);
void listenToTopic(const std::string &topic, std::shared_ptr<TwitchAccount> account);
void listen(rapidjson::Document &&msg);
bool tryListen(rapidjson::Document &msg);
+3 -3
View File
@@ -1,10 +1,10 @@
#include "providers/twitch/TwitchAccount.hpp"
#include "providers/twitch/Const.hpp"
#include "debug/Log.hpp"
#include "common/NetworkRequest.hpp"
#include "util/RapidjsonHelpers.hpp"
#include "common/UrlFetch.hpp"
#include "debug/Log.hpp"
#include "providers/twitch/Const.hpp"
#include "util/RapidjsonHelpers.hpp"
namespace chatterino {
@@ -1,8 +1,8 @@
#include "providers/twitch/TwitchAccountManager.hpp"
#include "common/Common.hpp"
#include "providers/twitch/Const.hpp"
#include "debug/Log.hpp"
#include "providers/twitch/Const.hpp"
namespace chatterino {
@@ -123,11 +123,10 @@ void TwitchAccountManager::load()
auto user = this->findUserByUsername(newUsername);
if (user) {
Log("[AccountManager:currentUsernameChanged] User successfully updated to {}",
newUsername);
newUsername);
this->currentUser = user;
} else {
Log(
"[AccountManager:currentUsernameChanged] User successfully updated to anonymous");
Log("[AccountManager:currentUsernameChanged] User successfully updated to anonymous");
this->currentUser = this->anonymousUser;
}
+5 -5
View File
@@ -1,6 +1,7 @@
#include "providers/twitch/TwitchChannel.hpp"
#include "common/Common.hpp"
#include "common/UrlFetch.hpp"
#include "debug/Log.hpp"
#include "messages/Message.hpp"
#include "providers/twitch/Pubsub.hpp"
@@ -9,7 +10,6 @@
#include "singletons/IrcManager.hpp"
#include "singletons/SettingsManager.hpp"
#include "util/PostToThread.hpp"
#include "common/UrlFetch.hpp"
#include <IrcConnection>
#include <QThread>
@@ -84,7 +84,7 @@ TwitchChannel::TwitchChannel(const QString &channelName, Communi::IrcConnection
}
twitchApiGet("https://tmi.twitch.tv/group/user/" + this->name + "/chatters",
QThread::currentThread(), refreshChatters);
QThread::currentThread(), refreshChatters);
};
doRefreshChatters();
@@ -145,7 +145,7 @@ void TwitchChannel::sendMessage(const QString &message)
// manager" dialog
this->addMessage(
chatterino::Message::createSystemMessage("You need to log in to send messages. You can "
"link your Twitch account in the settings."));
"link your Twitch account in the settings."));
return;
}
@@ -234,7 +234,7 @@ void TwitchChannel::addJoinedUser(const QString &user)
std::lock_guard<std::mutex> guard(this->joinedUserMutex);
auto message = chatterino::Message::createSystemMessage("Users joined: " +
this->joinedUsers.join(", "));
this->joinedUsers.join(", "));
message->flags |= chatterino::Message::Collapsed;
this->addMessage(message);
this->joinedUsers.clear();
@@ -263,7 +263,7 @@ void TwitchChannel::addPartedUser(const QString &user)
std::lock_guard<std::mutex> guard(this->partedUserMutex);
auto message = chatterino::Message::createSystemMessage("Users parted: " +
this->partedUsers.join(", "));
this->partedUsers.join(", "));
message->flags |= chatterino::Message::Collapsed;
this->addMessage(message);
this->partedUsers.clear();
+1 -1
View File
@@ -4,10 +4,10 @@
#include "common/Channel.hpp"
#include "common/Common.hpp"
#include "common/MutexValue.hpp"
#include "singletons/EmoteManager.hpp"
#include "singletons/IrcManager.hpp"
#include "util/ConcurrentMap.hpp"
#include "common/MutexValue.hpp"
#include <pajlada/signals/signalholder.hpp>
+1 -1
View File
@@ -1,10 +1,10 @@
#pragma once
#include "common/Emotemap.hpp"
#include "providers/twitch/EmoteValue.hpp"
#include "providers/twitch/TwitchAccount.hpp"
#include "providers/twitch/TwitchEmotes.hpp"
#include "util/ConcurrentMap.hpp"
#include "common/Emotemap.hpp"
#include <map>
+1 -2
View File
@@ -32,8 +32,7 @@ void TwitchServer::initialize()
[this]() { postToThread([this] { this->connect(); }); });
}
void TwitchServer::initializeConnection(IrcConnection *connection, bool isRead,
bool isWrite)
void TwitchServer::initializeConnection(IrcConnection *connection, bool isRead, bool isWrite)
{
std::shared_ptr<TwitchAccount> account = getApp()->accounts->twitch.getCurrent();