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
+18 -3
View File
@@ -4,8 +4,14 @@
#include "messages/messagebuilder.hpp"
#include <QString>
#include <QVariant>
namespace chatterino {
class Resources;
class EmoteManager;
class WindowManager;
namespace twitch {
class TwitchMessageBuilder : public messages::MessageBuilder
@@ -13,17 +19,26 @@ class TwitchMessageBuilder : public messages::MessageBuilder
public:
TwitchMessageBuilder();
void appendTwitchBadges(const QStringList &badges);
QString messageId;
QString userName;
static messages::SharedMessage parse(const Communi::IrcPrivateMessage *ircMessage,
Channel *channel, const messages::MessageParseArgs &args);
Channel *channel, const messages::MessageParseArgs &args,
const Resources &resources, EmoteManager &emoteManager,
WindowManager &windowManager);
// static bool sortTwitchEmotes(
// const std::pair<long int, messages::LazyLoadedImage *> &a,
// const std::pair<long int, messages::LazyLoadedImage *> &b);
private:
void appendModerationWords(const Communi::IrcPrivateMessage *ircMessage,
const Resources &resources);
void appendTwitchEmote(const Communi::IrcPrivateMessage *ircMessage, const QString &emote,
std::vector<std::pair<long int, messages::LazyLoadedImage *>> &vec,
EmoteManager &emoteManager);
void appendTwitchBadges(const QStringList &badges, const Resources &resources,
EmoteManager &emoteManager);
};
} // namespace twitch