mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Remove Unnecessary Includes in Headers (#4275)
* refactor: remove unnecessary includes in headers * fix: formatting * chore: changelog * fix: scrollbar * fix: suggestions and old appbase remains * fix: suggestion * fix: missing Qt forward declarations * fix: another qt include * fix: includes for precompiled-headers=off * Add missing `<memory>` includes * Add missing `#pragma once` * Fix tests Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
parent
f04c4c7388
commit
1043f9f803
|
@ -24,7 +24,7 @@
|
||||||
- Dev: Ignore `WM_SHOWWINDOW` hide events, causing fewer attempted rescales. (#4198)
|
- Dev: Ignore `WM_SHOWWINDOW` hide events, causing fewer attempted rescales. (#4198)
|
||||||
- Dev: Migrated to C++ 20 (#4252, #4257)
|
- Dev: Migrated to C++ 20 (#4252, #4257)
|
||||||
- Dev: Enable LTO for main branch builds. (#4258, #4260)
|
- Dev: Enable LTO for main branch builds. (#4258, #4260)
|
||||||
- Dev: Removed unused include directives. (#4266)
|
- Dev: Removed unused include directives. (#4266, #4275)
|
||||||
- Dev: Removed TooltipPreviewImage. (#4268)
|
- Dev: Removed TooltipPreviewImage. (#4268)
|
||||||
- Dev: Removed unused operators in `Image` (#4267)
|
- Dev: Removed unused operators in `Image` (#4267)
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include "common/QLogging.hpp"
|
#include "common/QLogging.hpp"
|
||||||
#include "common/Version.hpp"
|
#include "common/Version.hpp"
|
||||||
#include "controllers/accounts/AccountController.hpp"
|
#include "controllers/accounts/AccountController.hpp"
|
||||||
|
#include "controllers/commands/Command.hpp"
|
||||||
#include "controllers/commands/CommandController.hpp"
|
#include "controllers/commands/CommandController.hpp"
|
||||||
#include "controllers/highlights/HighlightController.hpp"
|
#include "controllers/highlights/HighlightController.hpp"
|
||||||
#include "controllers/hotkeys/HotkeyController.hpp"
|
#include "controllers/hotkeys/HotkeyController.hpp"
|
||||||
|
@ -11,24 +12,27 @@
|
||||||
#include "controllers/notifications/NotificationController.hpp"
|
#include "controllers/notifications/NotificationController.hpp"
|
||||||
#include "controllers/userdata/UserDataController.hpp"
|
#include "controllers/userdata/UserDataController.hpp"
|
||||||
#include "debug/AssertInGuiThread.hpp"
|
#include "debug/AssertInGuiThread.hpp"
|
||||||
|
#include "messages/Message.hpp"
|
||||||
#include "messages/MessageBuilder.hpp"
|
#include "messages/MessageBuilder.hpp"
|
||||||
#include "providers/bttv/BttvEmotes.hpp"
|
|
||||||
#include "providers/chatterino/ChatterinoBadges.hpp"
|
#include "providers/chatterino/ChatterinoBadges.hpp"
|
||||||
#include "providers/ffz/FfzBadges.hpp"
|
#include "providers/ffz/FfzBadges.hpp"
|
||||||
#include "providers/ffz/FfzEmotes.hpp"
|
|
||||||
#include "providers/irc/Irc2.hpp"
|
#include "providers/irc/Irc2.hpp"
|
||||||
|
#include "providers/seventv/eventapi/SeventvEventAPIDispatch.hpp"
|
||||||
|
#include "providers/seventv/eventapi/SeventvEventAPISubscription.hpp"
|
||||||
#include "providers/seventv/SeventvBadges.hpp"
|
#include "providers/seventv/SeventvBadges.hpp"
|
||||||
#include "providers/seventv/SeventvEmotes.hpp"
|
|
||||||
#include "providers/seventv/SeventvEventAPI.hpp"
|
#include "providers/seventv/SeventvEventAPI.hpp"
|
||||||
|
#include "providers/twitch/ChannelPointReward.hpp"
|
||||||
|
#include "providers/twitch/PubSubActions.hpp"
|
||||||
#include "providers/twitch/PubSubManager.hpp"
|
#include "providers/twitch/PubSubManager.hpp"
|
||||||
|
#include "providers/twitch/PubSubMessages.hpp"
|
||||||
|
#include "providers/twitch/TwitchChannel.hpp"
|
||||||
#include "providers/twitch/TwitchIrcServer.hpp"
|
#include "providers/twitch/TwitchIrcServer.hpp"
|
||||||
#include "providers/twitch/TwitchMessageBuilder.hpp"
|
#include "providers/twitch/TwitchMessageBuilder.hpp"
|
||||||
#include "singletons/Emotes.hpp"
|
#include "singletons/Emotes.hpp"
|
||||||
#include "singletons/Fonts.hpp"
|
#include "singletons/Fonts.hpp"
|
||||||
|
#include "singletons/helper/LoggingChannel.hpp"
|
||||||
#include "singletons/Logging.hpp"
|
#include "singletons/Logging.hpp"
|
||||||
#include "singletons/NativeMessaging.hpp"
|
|
||||||
#include "singletons/Paths.hpp"
|
#include "singletons/Paths.hpp"
|
||||||
#include "singletons/Resources.hpp"
|
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
#include "singletons/Theme.hpp"
|
#include "singletons/Theme.hpp"
|
||||||
#include "singletons/Toasts.hpp"
|
#include "singletons/Toasts.hpp"
|
||||||
|
@ -36,7 +40,6 @@
|
||||||
#include "singletons/WindowManager.hpp"
|
#include "singletons/WindowManager.hpp"
|
||||||
#include "util/Helpers.hpp"
|
#include "util/Helpers.hpp"
|
||||||
#include "util/PostToThread.hpp"
|
#include "util/PostToThread.hpp"
|
||||||
#include "util/RapidjsonHelpers.hpp"
|
|
||||||
#include "widgets/Notebook.hpp"
|
#include "widgets/Notebook.hpp"
|
||||||
#include "widgets/splits/Split.hpp"
|
#include "widgets/splits/Split.hpp"
|
||||||
#include "widgets/Window.hpp"
|
#include "widgets/Window.hpp"
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/SignalVector.hpp"
|
|
||||||
#include "common/Singleton.hpp"
|
#include "common/Singleton.hpp"
|
||||||
#include "singletons/NativeMessaging.hpp"
|
#include "singletons/NativeMessaging.hpp"
|
||||||
|
|
||||||
|
@ -25,7 +24,6 @@ class Theme;
|
||||||
class WindowManager;
|
class WindowManager;
|
||||||
class Logging;
|
class Logging;
|
||||||
class Paths;
|
class Paths;
|
||||||
class AccountManager;
|
|
||||||
class Emotes;
|
class Emotes;
|
||||||
class IEmotes;
|
class IEmotes;
|
||||||
class Settings;
|
class Settings;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef AB_SETTINGS_H
|
#pragma once
|
||||||
#define AB_SETTINGS_H
|
|
||||||
|
|
||||||
#include "common/ChatterinoSetting.hpp"
|
#include "common/ChatterinoSetting.hpp"
|
||||||
|
|
||||||
|
@ -46,8 +45,3 @@ Settings *getSettings();
|
||||||
AB_SETTINGS_CLASS *getABSettings();
|
AB_SETTINGS_CLASS *getABSettings();
|
||||||
|
|
||||||
} // namespace chatterino
|
} // namespace chatterino
|
||||||
|
|
||||||
#ifdef CHATTERINO
|
|
||||||
# include "singletons/Settings.hpp"
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -70,6 +70,10 @@ set(SOURCE_FILES
|
||||||
|
|
||||||
controllers/filters/FilterModel.cpp
|
controllers/filters/FilterModel.cpp
|
||||||
controllers/filters/FilterModel.hpp
|
controllers/filters/FilterModel.hpp
|
||||||
|
controllers/filters/FilterRecord.cpp
|
||||||
|
controllers/filters/FilterRecord.hpp
|
||||||
|
controllers/filters/FilterSet.cpp
|
||||||
|
controllers/filters/FilterSet.hpp
|
||||||
controllers/filters/parser/FilterParser.cpp
|
controllers/filters/parser/FilterParser.cpp
|
||||||
controllers/filters/parser/FilterParser.hpp
|
controllers/filters/parser/FilterParser.hpp
|
||||||
controllers/filters/parser/Tokenizer.cpp
|
controllers/filters/parser/Tokenizer.cpp
|
||||||
|
@ -188,8 +192,6 @@ set(SOURCE_FILES
|
||||||
|
|
||||||
providers/bttv/BttvEmotes.cpp
|
providers/bttv/BttvEmotes.cpp
|
||||||
providers/bttv/BttvEmotes.hpp
|
providers/bttv/BttvEmotes.hpp
|
||||||
providers/bttv/LoadBttvChannelEmote.cpp
|
|
||||||
providers/bttv/LoadBttvChannelEmote.hpp
|
|
||||||
|
|
||||||
providers/chatterino/ChatterinoBadges.cpp
|
providers/chatterino/ChatterinoBadges.cpp
|
||||||
providers/chatterino/ChatterinoBadges.hpp
|
providers/chatterino/ChatterinoBadges.hpp
|
||||||
|
@ -330,6 +332,7 @@ set(SOURCE_FILES
|
||||||
util/AttachToConsole.hpp
|
util/AttachToConsole.hpp
|
||||||
util/Clipboard.cpp
|
util/Clipboard.cpp
|
||||||
util/Clipboard.hpp
|
util/Clipboard.hpp
|
||||||
|
util/ConcurrentMap.hpp
|
||||||
util/DebugCount.cpp
|
util/DebugCount.cpp
|
||||||
util/DebugCount.hpp
|
util/DebugCount.hpp
|
||||||
util/DisplayBadge.cpp
|
util/DisplayBadge.cpp
|
||||||
|
@ -356,6 +359,7 @@ set(SOURCE_FILES
|
||||||
util/RatelimitBucket.hpp
|
util/RatelimitBucket.hpp
|
||||||
util/SampleData.cpp
|
util/SampleData.cpp
|
||||||
util/SampleData.hpp
|
util/SampleData.hpp
|
||||||
|
util/SharedPtrElementLess.hpp
|
||||||
util/SplitCommand.cpp
|
util/SplitCommand.cpp
|
||||||
util/SplitCommand.hpp
|
util/SplitCommand.hpp
|
||||||
util/StreamLink.cpp
|
util/StreamLink.cpp
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
#include "ChannelChatters.hpp"
|
#include "ChannelChatters.hpp"
|
||||||
|
|
||||||
|
#include "common/Channel.hpp"
|
||||||
#include "messages/Message.hpp"
|
#include "messages/Message.hpp"
|
||||||
#include "messages/MessageBuilder.hpp"
|
#include "messages/MessageBuilder.hpp"
|
||||||
#include "providers/twitch/TwitchMessageBuilder.hpp"
|
#include "providers/twitch/TwitchMessageBuilder.hpp"
|
||||||
|
|
||||||
|
#include <QColor>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
ChannelChatters::ChannelChatters(Channel &channel)
|
ChannelChatters::ChannelChatters(Channel &channel)
|
||||||
|
|
|
@ -1,15 +1,18 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/Channel.hpp"
|
|
||||||
#include "common/ChatterSet.hpp"
|
#include "common/ChatterSet.hpp"
|
||||||
#include "common/UniqueAccess.hpp"
|
#include "common/UniqueAccess.hpp"
|
||||||
#include "lrucache/lrucache.hpp"
|
#include "lrucache/lrucache.hpp"
|
||||||
#include "util/QStringHash.hpp"
|
#include "util/QStringHash.hpp"
|
||||||
|
|
||||||
|
#include <QColor>
|
||||||
|
#include <QObject>
|
||||||
#include <QRgb>
|
#include <QRgb>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
class Channel;
|
||||||
|
|
||||||
class ChannelChatters
|
class ChannelChatters
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/Aliases.hpp"
|
|
||||||
#include "common/Outcome.hpp"
|
|
||||||
#include "common/ProviderId.hpp"
|
|
||||||
|
|
||||||
#include <boost/optional.hpp>
|
#include <boost/optional.hpp>
|
||||||
#include <boost/preprocessor.hpp>
|
#include <boost/preprocessor.hpp>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
@ -20,11 +16,6 @@ enum class HighlightState {
|
||||||
NewMessage,
|
NewMessage,
|
||||||
};
|
};
|
||||||
|
|
||||||
inline QString qS(const std::string &string)
|
|
||||||
{
|
|
||||||
return QString::fromStdString(string);
|
|
||||||
}
|
|
||||||
|
|
||||||
const Qt::KeyboardModifiers showSplitOverlayModifiers =
|
const Qt::KeyboardModifiers showSplitOverlayModifiers =
|
||||||
Qt::ControlModifier | Qt::AltModifier;
|
Qt::ControlModifier | Qt::AltModifier;
|
||||||
const Qt::KeyboardModifiers showAddSplitRegions =
|
const Qt::KeyboardModifiers showAddSplitRegions =
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
#include "common/ChatterSet.hpp"
|
#include "common/ChatterSet.hpp"
|
||||||
#include "controllers/accounts/AccountController.hpp"
|
#include "controllers/accounts/AccountController.hpp"
|
||||||
|
#include "controllers/commands/Command.hpp"
|
||||||
#include "controllers/commands/CommandController.hpp"
|
#include "controllers/commands/CommandController.hpp"
|
||||||
#include "messages/Emote.hpp"
|
#include "messages/Emote.hpp"
|
||||||
#include "providers/twitch/TwitchAccount.hpp"
|
#include "providers/twitch/TwitchAccount.hpp"
|
||||||
|
|
|
@ -3,9 +3,7 @@
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QNetworkAccessManager>
|
#include <QNetworkAccessManager>
|
||||||
#include <QNetworkReply>
|
#include <QNetworkReply>
|
||||||
#include <QNetworkRequest>
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QStringList>
|
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QRegularExpressionMatch>
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/NetworkCommon.hpp"
|
#include "common/NetworkCommon.hpp"
|
||||||
#include "common/NetworkResult.hpp"
|
|
||||||
|
|
||||||
#include <QHttpMultiPart>
|
#include <QHttpMultiPart>
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,12 @@
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
class SignalVector;
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
struct SignalVectorItemEvent;
|
||||||
|
|
||||||
template <typename TVectorItem>
|
template <typename TVectorItem>
|
||||||
class SignalVectorModel : public QAbstractTableModel,
|
class SignalVectorModel : public QAbstractTableModel,
|
||||||
pajlada::Signals::SignalHolder
|
pajlada::Signals::SignalHolder
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include "controllers/accounts/Account.hpp"
|
#include "controllers/accounts/Account.hpp"
|
||||||
#include "controllers/accounts/AccountModel.hpp"
|
#include "controllers/accounts/AccountModel.hpp"
|
||||||
#include "providers/twitch/TwitchAccount.hpp"
|
#include "providers/twitch/TwitchAccount.hpp"
|
||||||
|
#include "util/SharedPtrElementLess.hpp"
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
#include "common/SignalVector.hpp"
|
#include "common/SignalVector.hpp"
|
||||||
#include "common/Singleton.hpp"
|
#include "common/Singleton.hpp"
|
||||||
#include "providers/twitch/TwitchAccountManager.hpp"
|
#include "providers/twitch/TwitchAccountManager.hpp"
|
||||||
#include "util/SharedPtrElementLess.hpp"
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/SignalVectorModel.hpp"
|
#include "common/SignalVectorModel.hpp"
|
||||||
#include "controllers/accounts/Account.hpp"
|
|
||||||
#include "util/QStringHash.hpp"
|
#include "util/QStringHash.hpp"
|
||||||
|
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
|
@ -1,12 +1,15 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/Channel.hpp"
|
|
||||||
#include "providers/twitch/TwitchChannel.hpp"
|
|
||||||
|
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
class Channel;
|
||||||
|
using ChannelPtr = std::shared_ptr<Channel>;
|
||||||
|
class TwitchChannel;
|
||||||
|
|
||||||
struct CommandContext {
|
struct CommandContext {
|
||||||
QStringList words;
|
QStringList words;
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,25 @@
|
||||||
#include "CommandController.hpp"
|
#include "controllers/commands/CommandController.hpp"
|
||||||
|
|
||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
#include "common/Env.hpp"
|
#include "common/Env.hpp"
|
||||||
|
#include "common/NetworkResult.hpp"
|
||||||
#include "common/QLogging.hpp"
|
#include "common/QLogging.hpp"
|
||||||
#include "common/SignalVector.hpp"
|
#include "common/SignalVector.hpp"
|
||||||
#include "controllers/accounts/AccountController.hpp"
|
#include "controllers/accounts/AccountController.hpp"
|
||||||
#include "controllers/commands/builtin/twitch/ChatSettings.hpp"
|
#include "controllers/commands/builtin/twitch/ChatSettings.hpp"
|
||||||
#include "controllers/commands/Command.hpp"
|
#include "controllers/commands/Command.hpp"
|
||||||
|
#include "controllers/commands/CommandContext.hpp"
|
||||||
#include "controllers/commands/CommandModel.hpp"
|
#include "controllers/commands/CommandModel.hpp"
|
||||||
#include "controllers/userdata/UserDataController.hpp"
|
#include "controllers/userdata/UserDataController.hpp"
|
||||||
#include "messages/Message.hpp"
|
#include "messages/Message.hpp"
|
||||||
#include "messages/MessageBuilder.hpp"
|
#include "messages/MessageBuilder.hpp"
|
||||||
#include "messages/MessageElement.hpp"
|
#include "messages/MessageElement.hpp"
|
||||||
|
#include "messages/MessageThread.hpp"
|
||||||
#include "providers/irc/IrcChannel2.hpp"
|
#include "providers/irc/IrcChannel2.hpp"
|
||||||
#include "providers/irc/IrcServer.hpp"
|
#include "providers/irc/IrcServer.hpp"
|
||||||
#include "providers/twitch/api/Helix.hpp"
|
#include "providers/twitch/api/Helix.hpp"
|
||||||
#include "providers/twitch/TwitchAccount.hpp"
|
#include "providers/twitch/TwitchAccount.hpp"
|
||||||
|
#include "providers/twitch/TwitchChannel.hpp"
|
||||||
#include "providers/twitch/TwitchCommon.hpp"
|
#include "providers/twitch/TwitchCommon.hpp"
|
||||||
#include "providers/twitch/TwitchIrcServer.hpp"
|
#include "providers/twitch/TwitchIrcServer.hpp"
|
||||||
#include "providers/twitch/TwitchMessageBuilder.hpp"
|
#include "providers/twitch/TwitchMessageBuilder.hpp"
|
||||||
|
@ -35,6 +39,7 @@
|
||||||
#include "util/Twitch.hpp"
|
#include "util/Twitch.hpp"
|
||||||
#include "widgets/dialogs/ReplyThreadPopup.hpp"
|
#include "widgets/dialogs/ReplyThreadPopup.hpp"
|
||||||
#include "widgets/dialogs/UserInfoPopup.hpp"
|
#include "widgets/dialogs/UserInfoPopup.hpp"
|
||||||
|
#include "widgets/helper/ChannelView.hpp"
|
||||||
#include "widgets/splits/Split.hpp"
|
#include "widgets/splits/Split.hpp"
|
||||||
#include "widgets/splits/SplitContainer.hpp"
|
#include "widgets/splits/SplitContainer.hpp"
|
||||||
#include "widgets/Window.hpp"
|
#include "widgets/Window.hpp"
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/ChatterinoSetting.hpp"
|
|
||||||
#include "common/SignalVector.hpp"
|
#include "common/SignalVector.hpp"
|
||||||
#include "common/Singleton.hpp"
|
#include "common/Singleton.hpp"
|
||||||
#include "controllers/commands/Command.hpp"
|
#include "util/QStringHash.hpp"
|
||||||
#include "controllers/commands/CommandContext.hpp"
|
|
||||||
#include "providers/twitch/TwitchChannel.hpp"
|
|
||||||
|
|
||||||
#include <pajlada/settings.hpp>
|
#include <pajlada/settings.hpp>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
|
@ -20,8 +17,12 @@ namespace chatterino {
|
||||||
class Settings;
|
class Settings;
|
||||||
class Paths;
|
class Paths;
|
||||||
class Channel;
|
class Channel;
|
||||||
|
using ChannelPtr = std::shared_ptr<Channel>;
|
||||||
|
struct Message;
|
||||||
|
|
||||||
|
struct Command;
|
||||||
class CommandModel;
|
class CommandModel;
|
||||||
|
struct CommandContext;
|
||||||
|
|
||||||
class CommandController final : public Singleton
|
class CommandController final : public Singleton
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#include "CommandModel.hpp"
|
#include "controllers/commands/CommandModel.hpp"
|
||||||
|
|
||||||
|
#include "common/SignalVector.hpp"
|
||||||
|
#include "controllers/commands/Command.hpp"
|
||||||
#include "util/StandardItemHelper.hpp"
|
#include "util/StandardItemHelper.hpp"
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/SignalVectorModel.hpp"
|
#include "common/SignalVectorModel.hpp"
|
||||||
#include "controllers/commands/Command.hpp"
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
class CommandController;
|
class CommandController;
|
||||||
|
struct Command;
|
||||||
|
|
||||||
class CommandModel : public SignalVectorModel<Command>
|
class CommandModel : public SignalVectorModel<Command>
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
#include "controllers/accounts/AccountController.hpp"
|
#include "controllers/accounts/AccountController.hpp"
|
||||||
|
#include "controllers/commands/CommandContext.hpp"
|
||||||
#include "messages/MessageBuilder.hpp"
|
#include "messages/MessageBuilder.hpp"
|
||||||
#include "providers/twitch/api/Helix.hpp"
|
#include "providers/twitch/api/Helix.hpp"
|
||||||
#include "providers/twitch/TwitchAccount.hpp"
|
#include "providers/twitch/TwitchAccount.hpp"
|
||||||
|
|
|
@ -1,24 +1,28 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "controllers/commands/CommandContext.hpp"
|
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
namespace chatterino::commands {
|
namespace chatterino {
|
||||||
|
|
||||||
QString emoteOnly(const CommandContext &ctx);
|
struct CommandContext;
|
||||||
QString emoteOnlyOff(const CommandContext &ctx);
|
|
||||||
|
|
||||||
QString subscribers(const CommandContext &ctx);
|
namespace commands {
|
||||||
QString subscribersOff(const CommandContext &ctx);
|
|
||||||
|
|
||||||
QString slow(const CommandContext &ctx);
|
QString emoteOnly(const CommandContext &ctx);
|
||||||
QString slowOff(const CommandContext &ctx);
|
QString emoteOnlyOff(const CommandContext &ctx);
|
||||||
|
|
||||||
QString followers(const CommandContext &ctx);
|
QString subscribers(const CommandContext &ctx);
|
||||||
QString followersOff(const CommandContext &ctx);
|
QString subscribersOff(const CommandContext &ctx);
|
||||||
|
|
||||||
QString uniqueChat(const CommandContext &ctx);
|
QString slow(const CommandContext &ctx);
|
||||||
QString uniqueChatOff(const CommandContext &ctx);
|
QString slowOff(const CommandContext &ctx);
|
||||||
|
|
||||||
} // namespace chatterino::commands
|
QString followers(const CommandContext &ctx);
|
||||||
|
QString followersOff(const CommandContext &ctx);
|
||||||
|
|
||||||
|
QString uniqueChat(const CommandContext &ctx);
|
||||||
|
QString uniqueChatOff(const CommandContext &ctx);
|
||||||
|
|
||||||
|
} // namespace commands
|
||||||
|
|
||||||
|
} // namespace chatterino
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "FilterModel.hpp"
|
#include "controllers/filters/FilterModel.hpp"
|
||||||
|
|
||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
|
#include "controllers/filters/FilterRecord.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
#include "util/StandardItemHelper.hpp"
|
#include "util/StandardItemHelper.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/SignalVectorModel.hpp"
|
#include "common/SignalVectorModel.hpp"
|
||||||
#include "controllers/filters/FilterRecord.hpp"
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
class FilterRecord;
|
||||||
|
using FilterRecordPtr = std::shared_ptr<FilterRecord>;
|
||||||
|
|
||||||
class FilterModel : public SignalVectorModel<FilterRecordPtr>
|
class FilterModel : public SignalVectorModel<FilterRecordPtr>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
53
src/controllers/filters/FilterRecord.cpp
Normal file
53
src/controllers/filters/FilterRecord.cpp
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
#include "controllers/filters/FilterRecord.hpp"
|
||||||
|
|
||||||
|
namespace chatterino {
|
||||||
|
|
||||||
|
FilterRecord::FilterRecord(const QString &name, const QString &filter)
|
||||||
|
: name_(name)
|
||||||
|
, filter_(filter)
|
||||||
|
, id_(QUuid::createUuid())
|
||||||
|
, parser_(std::make_unique<filterparser::FilterParser>(filter))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
FilterRecord::FilterRecord(const QString &name, const QString &filter,
|
||||||
|
const QUuid &id)
|
||||||
|
: name_(name)
|
||||||
|
, filter_(filter)
|
||||||
|
, id_(id)
|
||||||
|
, parser_(std::make_unique<filterparser::FilterParser>(filter))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
const QString &FilterRecord::getName() const
|
||||||
|
{
|
||||||
|
return this->name_;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QString &FilterRecord::getFilter() const
|
||||||
|
{
|
||||||
|
return this->filter_;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QUuid &FilterRecord::getId() const
|
||||||
|
{
|
||||||
|
return this->id_;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool FilterRecord::valid() const
|
||||||
|
{
|
||||||
|
return this->parser_->valid();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool FilterRecord::filter(const filterparser::ContextMap &context) const
|
||||||
|
{
|
||||||
|
return this->parser_->execute(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool FilterRecord::operator==(const FilterRecord &other) const
|
||||||
|
{
|
||||||
|
return std::tie(this->name_, this->filter_, this->id_) ==
|
||||||
|
std::tie(other.name_, other.filter_, other.id_);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace chatterino
|
|
@ -1,7 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "controllers/filters/parser/FilterParser.hpp"
|
#include "controllers/filters/parser/FilterParser.hpp"
|
||||||
#include "controllers/filters/parser/Types.hpp"
|
|
||||||
#include "util/RapidjsonHelpers.hpp"
|
#include "util/RapidjsonHelpers.hpp"
|
||||||
#include "util/RapidJsonSerializeQString.hpp"
|
#include "util/RapidJsonSerializeQString.hpp"
|
||||||
|
|
||||||
|
@ -17,52 +16,21 @@ namespace chatterino {
|
||||||
class FilterRecord
|
class FilterRecord
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool operator==(const FilterRecord &other) const
|
FilterRecord(const QString &name, const QString &filter);
|
||||||
{
|
|
||||||
return std::tie(this->name_, this->filter_, this->id_) ==
|
|
||||||
std::tie(other.name_, other.filter_, other.id_);
|
|
||||||
}
|
|
||||||
|
|
||||||
FilterRecord(const QString &name, const QString &filter)
|
FilterRecord(const QString &name, const QString &filter, const QUuid &id);
|
||||||
: name_(name)
|
|
||||||
, filter_(filter)
|
|
||||||
, id_(QUuid::createUuid())
|
|
||||||
, parser_(std::make_unique<filterparser::FilterParser>(filter))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
FilterRecord(const QString &name, const QString &filter, const QUuid &id)
|
const QString &getName() const;
|
||||||
: name_(name)
|
|
||||||
, filter_(filter)
|
|
||||||
, id_(id)
|
|
||||||
, parser_(std::make_unique<filterparser::FilterParser>(filter))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
const QString &getName() const
|
const QString &getFilter() const;
|
||||||
{
|
|
||||||
return this->name_;
|
|
||||||
}
|
|
||||||
|
|
||||||
const QString &getFilter() const
|
const QUuid &getId() const;
|
||||||
{
|
|
||||||
return this->filter_;
|
|
||||||
}
|
|
||||||
|
|
||||||
const QUuid &getId() const
|
bool valid() const;
|
||||||
{
|
|
||||||
return this->id_;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool valid() const
|
bool filter(const filterparser::ContextMap &context) const;
|
||||||
{
|
|
||||||
return this->parser_->valid();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool filter(const filterparser::ContextMap &context) const
|
bool operator==(const FilterRecord &other) const;
|
||||||
{
|
|
||||||
return this->parser_->execute(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString name_;
|
QString name_;
|
||||||
|
|
78
src/controllers/filters/FilterSet.cpp
Normal file
78
src/controllers/filters/FilterSet.cpp
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
#include "controllers/filters/FilterSet.hpp"
|
||||||
|
|
||||||
|
#include "controllers/filters/FilterRecord.hpp"
|
||||||
|
#include "singletons/Settings.hpp"
|
||||||
|
|
||||||
|
namespace chatterino {
|
||||||
|
|
||||||
|
FilterSet::FilterSet()
|
||||||
|
{
|
||||||
|
this->listener_ =
|
||||||
|
getCSettings().filterRecords.delayedItemsChanged.connect([this] {
|
||||||
|
this->reloadFilters();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
FilterSet::FilterSet(const QList<QUuid> &filterIds)
|
||||||
|
{
|
||||||
|
auto filters = getCSettings().filterRecords.readOnly();
|
||||||
|
for (const auto &f : *filters)
|
||||||
|
{
|
||||||
|
if (filterIds.contains(f->getId()))
|
||||||
|
this->filters_.insert(f->getId(), f);
|
||||||
|
}
|
||||||
|
|
||||||
|
this->listener_ =
|
||||||
|
getCSettings().filterRecords.delayedItemsChanged.connect([this] {
|
||||||
|
this->reloadFilters();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
FilterSet::~FilterSet()
|
||||||
|
{
|
||||||
|
this->listener_.disconnect();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool FilterSet::filter(const MessagePtr &m, ChannelPtr channel) const
|
||||||
|
{
|
||||||
|
if (this->filters_.size() == 0)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
filterparser::ContextMap context =
|
||||||
|
filterparser::buildContextMap(m, channel.get());
|
||||||
|
for (const auto &f : this->filters_.values())
|
||||||
|
{
|
||||||
|
if (!f->valid() || !f->filter(context))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QList<QUuid> FilterSet::filterIds() const
|
||||||
|
{
|
||||||
|
return this->filters_.keys();
|
||||||
|
}
|
||||||
|
|
||||||
|
void FilterSet::reloadFilters()
|
||||||
|
{
|
||||||
|
auto filters = getCSettings().filterRecords.readOnly();
|
||||||
|
for (const auto &key : this->filters_.keys())
|
||||||
|
{
|
||||||
|
bool found = false;
|
||||||
|
for (const auto &f : *filters)
|
||||||
|
{
|
||||||
|
if (f->getId() == key)
|
||||||
|
{
|
||||||
|
found = true;
|
||||||
|
this->filters_.insert(key, f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!found)
|
||||||
|
{
|
||||||
|
this->filters_.remove(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace chatterino
|
|
@ -1,86 +1,37 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "controllers/filters/FilterRecord.hpp"
|
#include <pajlada/signals.hpp>
|
||||||
#include "singletons/Settings.hpp"
|
#include <QList>
|
||||||
|
#include <QMap>
|
||||||
|
#include <QUuid>
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
class FilterRecord;
|
||||||
|
using FilterRecordPtr = std::shared_ptr<FilterRecord>;
|
||||||
|
struct Message;
|
||||||
|
class Channel;
|
||||||
|
using MessagePtr = std::shared_ptr<const Message>;
|
||||||
|
using ChannelPtr = std::shared_ptr<Channel>;
|
||||||
|
|
||||||
class FilterSet
|
class FilterSet
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FilterSet()
|
FilterSet();
|
||||||
{
|
FilterSet(const QList<QUuid> &filterIds);
|
||||||
this->listener_ =
|
|
||||||
getCSettings().filterRecords.delayedItemsChanged.connect([this] {
|
|
||||||
this->reloadFilters();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
FilterSet(const QList<QUuid> &filterIds)
|
~FilterSet();
|
||||||
{
|
|
||||||
auto filters = getCSettings().filterRecords.readOnly();
|
|
||||||
for (const auto &f : *filters)
|
|
||||||
{
|
|
||||||
if (filterIds.contains(f->getId()))
|
|
||||||
this->filters_.insert(f->getId(), f);
|
|
||||||
}
|
|
||||||
|
|
||||||
this->listener_ =
|
bool filter(const MessagePtr &m, ChannelPtr channel) const;
|
||||||
getCSettings().filterRecords.delayedItemsChanged.connect([this] {
|
const QList<QUuid> filterIds() const;
|
||||||
this->reloadFilters();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
~FilterSet()
|
|
||||||
{
|
|
||||||
this->listener_.disconnect();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool filter(const MessagePtr &m, ChannelPtr channel) const
|
|
||||||
{
|
|
||||||
if (this->filters_.size() == 0)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
filterparser::ContextMap context =
|
|
||||||
filterparser::buildContextMap(m, channel.get());
|
|
||||||
for (const auto &f : this->filters_.values())
|
|
||||||
{
|
|
||||||
if (!f->valid() || !f->filter(context))
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
const QList<QUuid> filterIds() const
|
|
||||||
{
|
|
||||||
return this->filters_.keys();
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QMap<QUuid, FilterRecordPtr> filters_;
|
QMap<QUuid, FilterRecordPtr> filters_;
|
||||||
pajlada::Signals::Connection listener_;
|
pajlada::Signals::Connection listener_;
|
||||||
|
|
||||||
void reloadFilters()
|
void reloadFilters();
|
||||||
{
|
|
||||||
auto filters = getCSettings().filterRecords.readOnly();
|
|
||||||
for (const auto &key : this->filters_.keys())
|
|
||||||
{
|
|
||||||
bool found = false;
|
|
||||||
for (const auto &f : *filters)
|
|
||||||
{
|
|
||||||
if (f->getId() == key)
|
|
||||||
{
|
|
||||||
found = true;
|
|
||||||
this->filters_.insert(key, f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!found)
|
|
||||||
{
|
|
||||||
this->filters_.remove(key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
using FilterSetPtr = std::shared_ptr<FilterSet>;
|
using FilterSetPtr = std::shared_ptr<FilterSet>;
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
#include "common/Channel.hpp"
|
#include "common/Channel.hpp"
|
||||||
#include "controllers/filters/parser/Types.hpp"
|
#include "controllers/filters/parser/Types.hpp"
|
||||||
|
#include "messages/Message.hpp"
|
||||||
|
#include "providers/twitch/TwitchBadge.hpp"
|
||||||
|
#include "providers/twitch/TwitchChannel.hpp"
|
||||||
#include "providers/twitch/TwitchIrcServer.hpp"
|
#include "providers/twitch/TwitchIrcServer.hpp"
|
||||||
|
|
||||||
namespace filterparser {
|
namespace filterparser {
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "messages/Message.hpp"
|
|
||||||
|
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
namespace chatterino {
|
||||||
|
|
||||||
|
struct Message;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
namespace filterparser {
|
namespace filterparser {
|
||||||
|
|
||||||
using MessagePtr = std::shared_ptr<const chatterino::Message>;
|
using MessagePtr = std::shared_ptr<const chatterino::Message>;
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
#include "BadgeHighlightModel.hpp"
|
#include "controllers/highlights/BadgeHighlightModel.hpp"
|
||||||
|
|
||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
|
#include "common/SignalVectorModel.hpp"
|
||||||
|
#include "controllers/highlights/HighlightBadge.hpp"
|
||||||
|
#include "controllers/highlights/HighlightPhrase.hpp"
|
||||||
#include "messages/Emote.hpp"
|
#include "messages/Emote.hpp"
|
||||||
|
#include "providers/twitch/TwitchBadges.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
#include "util/StandardItemHelper.hpp"
|
#include "util/StandardItemHelper.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/SignalVectorModel.hpp"
|
#include "common/SignalVectorModel.hpp"
|
||||||
#include "controllers/highlights/HighlightBadge.hpp"
|
|
||||||
#include "providers/twitch/TwitchBadges.hpp"
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
class HighlightController;
|
class HighlightController;
|
||||||
|
class HighlightBadge;
|
||||||
|
|
||||||
class BadgeHighlightModel : public SignalVectorModel<HighlightBadge>
|
class BadgeHighlightModel : public SignalVectorModel<HighlightBadge>
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "HighlightBadge.hpp"
|
#include "HighlightBadge.hpp"
|
||||||
|
|
||||||
#include "messages/SharedMessageBuilder.hpp"
|
#include "messages/SharedMessageBuilder.hpp"
|
||||||
|
#include "providers/twitch/TwitchBadge.hpp"
|
||||||
#include "singletons/Resources.hpp"
|
#include "singletons/Resources.hpp"
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
|
@ -1,14 +1,19 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "providers/twitch/TwitchBadge.hpp"
|
|
||||||
#include "util/RapidjsonHelpers.hpp"
|
#include "util/RapidjsonHelpers.hpp"
|
||||||
#include "util/RapidJsonSerializeQString.hpp"
|
#include "util/RapidJsonSerializeQString.hpp"
|
||||||
|
|
||||||
#include <pajlada/serialize.hpp>
|
#include <pajlada/serialize.hpp>
|
||||||
|
#include <QColor>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
class Badge;
|
||||||
|
|
||||||
class HighlightBadge
|
class HighlightBadge
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "controllers/highlights/HighlightBlacklistModel.hpp"
|
#include "controllers/highlights/HighlightBlacklistModel.hpp"
|
||||||
|
|
||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
|
#include "controllers/highlights/HighlightBlacklistUser.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
#include "util/StandardItemHelper.hpp"
|
#include "util/StandardItemHelper.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/SignalVectorModel.hpp"
|
#include "common/SignalVectorModel.hpp"
|
||||||
#include "controllers/highlights/HighlightBlacklistUser.hpp"
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
class HighlightBlacklistUser;
|
||||||
class HighlightController;
|
class HighlightController;
|
||||||
|
|
||||||
class HighlightBlacklistModel : public SignalVectorModel<HighlightBlacklistUser>
|
class HighlightBlacklistModel : public SignalVectorModel<HighlightBlacklistUser>
|
||||||
|
|
|
@ -1,7 +1,17 @@
|
||||||
#include "controllers/highlights/HighlightController.hpp"
|
#include "controllers/highlights/HighlightController.hpp"
|
||||||
|
|
||||||
|
#include "Application.hpp"
|
||||||
#include "common/QLogging.hpp"
|
#include "common/QLogging.hpp"
|
||||||
|
#include "controllers/accounts/AccountController.hpp"
|
||||||
|
#include "controllers/highlights/HighlightBadge.hpp"
|
||||||
|
#include "controllers/highlights/HighlightPhrase.hpp"
|
||||||
|
#include "messages/Message.hpp"
|
||||||
|
#include "messages/MessageBuilder.hpp"
|
||||||
|
#include "providers/colors/ColorProvider.hpp"
|
||||||
#include "providers/twitch/TwitchAccount.hpp"
|
#include "providers/twitch/TwitchAccount.hpp"
|
||||||
|
#include "providers/twitch/TwitchBadge.hpp"
|
||||||
|
#include "singletons/Paths.hpp"
|
||||||
|
#include "singletons/Settings.hpp"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
@ -282,6 +292,89 @@ void rebuildBadgeHighlights(Settings &settings,
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
HighlightResult::HighlightResult(bool _alert, bool _playSound,
|
||||||
|
boost::optional<QUrl> _customSoundUrl,
|
||||||
|
std::shared_ptr<QColor> _color,
|
||||||
|
bool _showInMentions)
|
||||||
|
: alert(_alert)
|
||||||
|
, playSound(_playSound)
|
||||||
|
, customSoundUrl(std::move(_customSoundUrl))
|
||||||
|
, color(std::move(_color))
|
||||||
|
, showInMentions(_showInMentions)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
HighlightResult HighlightResult::emptyResult()
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
false, false, boost::none, nullptr, false,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
bool HighlightResult::operator==(const HighlightResult &other) const
|
||||||
|
{
|
||||||
|
if (this->alert != other.alert)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (this->playSound != other.playSound)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (this->customSoundUrl != other.customSoundUrl)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this->color && other.color)
|
||||||
|
{
|
||||||
|
if (*this->color != *other.color)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this->showInMentions != other.showInMentions)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool HighlightResult::operator!=(const HighlightResult &other) const
|
||||||
|
{
|
||||||
|
return !(*this == other);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool HighlightResult::empty() const
|
||||||
|
{
|
||||||
|
return !this->alert && !this->playSound &&
|
||||||
|
!this->customSoundUrl.has_value() && !this->color &&
|
||||||
|
!this->showInMentions;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool HighlightResult::full() const
|
||||||
|
{
|
||||||
|
return this->alert && this->playSound && this->customSoundUrl.has_value() &&
|
||||||
|
this->color && this->showInMentions;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::ostream &operator<<(std::ostream &os, const HighlightResult &result)
|
||||||
|
{
|
||||||
|
os << "Alert: " << (result.alert ? "Yes" : "No") << ", "
|
||||||
|
<< "Play sound: " << (result.playSound ? "Yes" : "No") << " ("
|
||||||
|
<< (result.customSoundUrl
|
||||||
|
? result.customSoundUrl.get().toString().toStdString()
|
||||||
|
: "")
|
||||||
|
<< ")"
|
||||||
|
<< ", "
|
||||||
|
<< "Color: " << (result.color ? result.color->name().toStdString() : "")
|
||||||
|
<< ", "
|
||||||
|
<< "Show in mentions: " << (result.showInMentions ? "Yes" : "No");
|
||||||
|
return os;
|
||||||
|
}
|
||||||
|
|
||||||
void HighlightController::initialize(Settings &settings, Paths & /*paths*/)
|
void HighlightController::initialize(Settings &settings, Paths & /*paths*/)
|
||||||
{
|
{
|
||||||
this->rebuildListener_.addSetting(settings.enableSelfHighlight);
|
this->rebuildListener_.addSetting(settings.enableSelfHighlight);
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "common/FlagsEnum.hpp"
|
||||||
#include "common/Singleton.hpp"
|
#include "common/Singleton.hpp"
|
||||||
#include "common/UniqueAccess.hpp"
|
#include "common/UniqueAccess.hpp"
|
||||||
#include "messages/MessageBuilder.hpp"
|
|
||||||
#include "providers/twitch/TwitchBadge.hpp"
|
|
||||||
#include "singletons/Paths.hpp"
|
|
||||||
#include "singletons/Settings.hpp"
|
|
||||||
|
|
||||||
#include <boost/optional.hpp>
|
#include <boost/optional.hpp>
|
||||||
|
#include <pajlada/settings.hpp>
|
||||||
|
#include <pajlada/settings/settinglistener.hpp>
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
|
@ -17,27 +16,20 @@
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
class Badge;
|
||||||
|
struct MessageParseArgs;
|
||||||
|
enum class MessageFlag : int64_t;
|
||||||
|
using MessageFlags = FlagsEnum<MessageFlag>;
|
||||||
|
|
||||||
struct HighlightResult {
|
struct HighlightResult {
|
||||||
HighlightResult(bool _alert, bool _playSound,
|
HighlightResult(bool _alert, bool _playSound,
|
||||||
boost::optional<QUrl> _customSoundUrl,
|
boost::optional<QUrl> _customSoundUrl,
|
||||||
std::shared_ptr<QColor> _color, bool _showInMentions)
|
std::shared_ptr<QColor> _color, bool _showInMentions);
|
||||||
: alert(_alert)
|
|
||||||
, playSound(_playSound)
|
|
||||||
, customSoundUrl(std::move(_customSoundUrl))
|
|
||||||
, color(std::move(_color))
|
|
||||||
, showInMentions(_showInMentions)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Construct an empty HighlightResult with all side-effects disabled
|
* @brief Construct an empty HighlightResult with all side-effects disabled
|
||||||
**/
|
**/
|
||||||
static HighlightResult emptyResult()
|
static HighlightResult emptyResult();
|
||||||
{
|
|
||||||
return {
|
|
||||||
false, false, boost::none, nullptr, false,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief true if highlight should trigger the taskbar to flash
|
* @brief true if highlight should trigger the taskbar to flash
|
||||||
|
@ -66,77 +58,21 @@ struct HighlightResult {
|
||||||
**/
|
**/
|
||||||
bool showInMentions{false};
|
bool showInMentions{false};
|
||||||
|
|
||||||
bool operator==(const HighlightResult &other) const
|
bool operator==(const HighlightResult &other) const;
|
||||||
{
|
bool operator!=(const HighlightResult &other) const;
|
||||||
if (this->alert != other.alert)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this->playSound != other.playSound)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this->customSoundUrl != other.customSoundUrl)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this->color && other.color)
|
|
||||||
{
|
|
||||||
if (*this->color != *other.color)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this->showInMentions != other.showInMentions)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool operator!=(const HighlightResult &other) const
|
|
||||||
{
|
|
||||||
return !(*this == other);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns true if no side-effect has been enabled
|
* @brief Returns true if no side-effect has been enabled
|
||||||
**/
|
**/
|
||||||
[[nodiscard]] bool empty() const
|
[[nodiscard]] bool empty() const;
|
||||||
{
|
|
||||||
return !this->alert && !this->playSound &&
|
|
||||||
!this->customSoundUrl.has_value() && !this->color &&
|
|
||||||
!this->showInMentions;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns true if all side-effects have been enabled
|
* @brief Returns true if all side-effects have been enabled
|
||||||
**/
|
**/
|
||||||
[[nodiscard]] bool full() const
|
[[nodiscard]] bool full() const;
|
||||||
{
|
|
||||||
return this->alert && this->playSound &&
|
|
||||||
this->customSoundUrl.has_value() && this->color &&
|
|
||||||
this->showInMentions;
|
|
||||||
}
|
|
||||||
|
|
||||||
friend std::ostream &operator<<(std::ostream &os,
|
friend std::ostream &operator<<(std::ostream &os,
|
||||||
const HighlightResult &result)
|
const HighlightResult &result);
|
||||||
{
|
|
||||||
os << "Alert: " << (result.alert ? "Yes" : "No") << ", "
|
|
||||||
<< "Play sound: " << (result.playSound ? "Yes" : "No") << " ("
|
|
||||||
<< (result.customSoundUrl
|
|
||||||
? result.customSoundUrl.get().toString().toStdString()
|
|
||||||
: "")
|
|
||||||
<< ")"
|
|
||||||
<< ", "
|
|
||||||
<< "Color: "
|
|
||||||
<< (result.color ? result.color->name().toStdString() : "") << ", "
|
|
||||||
<< "Show in mentions: " << (result.showInMentions ? "Yes" : "No");
|
|
||||||
return os;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct HighlightCheck {
|
struct HighlightCheck {
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#include "HighlightModel.hpp"
|
#include "controllers/highlights/HighlightModel.hpp"
|
||||||
|
|
||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
|
#include "common/SignalVectorModel.hpp"
|
||||||
|
#include "controllers/highlights/HighlightPhrase.hpp"
|
||||||
|
#include "providers/colors/ColorProvider.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
#include "singletons/WindowManager.hpp"
|
#include "singletons/WindowManager.hpp"
|
||||||
#include "util/StandardItemHelper.hpp"
|
#include "util/StandardItemHelper.hpp"
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/SignalVectorModel.hpp"
|
#include "common/SignalVectorModel.hpp"
|
||||||
#include "controllers/highlights/HighlightPhrase.hpp"
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
class HighlightPhrase;
|
||||||
|
|
||||||
class HighlightModel : public SignalVectorModel<HighlightPhrase>
|
class HighlightModel : public SignalVectorModel<HighlightPhrase>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "providers/colors/ColorProvider.hpp"
|
|
||||||
#include "util/RapidjsonHelpers.hpp"
|
#include "util/RapidjsonHelpers.hpp"
|
||||||
#include "util/RapidJsonSerializeQString.hpp"
|
#include "util/RapidJsonSerializeQString.hpp"
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
#include "controllers/highlights/HighlightModel.hpp"
|
#include "controllers/highlights/HighlightModel.hpp"
|
||||||
|
#include "controllers/highlights/HighlightPhrase.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
#include "util/StandardItemHelper.hpp"
|
#include "util/StandardItemHelper.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/SignalVectorModel.hpp"
|
#include "common/SignalVectorModel.hpp"
|
||||||
#include "controllers/highlights/HighlightPhrase.hpp"
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
class HighlightController;
|
class HighlightController;
|
||||||
|
class HighlightPhrase;
|
||||||
|
|
||||||
class UserHighlightModel : public SignalVectorModel<HighlightPhrase>
|
class UserHighlightModel : public SignalVectorModel<HighlightPhrase>
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "HotkeyCategory.hpp"
|
#include "controllers/hotkeys/HotkeyCategory.hpp"
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "controllers/hotkeys/HotkeyController.hpp"
|
#include "controllers/hotkeys/HotkeyController.hpp"
|
||||||
|
|
||||||
#include "common/QLogging.hpp"
|
#include "common/QLogging.hpp"
|
||||||
|
#include "controllers/hotkeys/Hotkey.hpp"
|
||||||
#include "controllers/hotkeys/HotkeyCategory.hpp"
|
#include "controllers/hotkeys/HotkeyCategory.hpp"
|
||||||
#include "controllers/hotkeys/HotkeyModel.hpp"
|
#include "controllers/hotkeys/HotkeyModel.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "controllers/hotkeys/HotkeyModel.hpp"
|
#include "controllers/hotkeys/HotkeyModel.hpp"
|
||||||
|
|
||||||
#include "common/QLogging.hpp"
|
#include "common/QLogging.hpp"
|
||||||
|
#include "controllers/hotkeys/Hotkey.hpp"
|
||||||
#include "util/StandardItemHelper.hpp"
|
#include "util/StandardItemHelper.hpp"
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/SignalVectorModel.hpp"
|
#include "common/SignalVectorModel.hpp"
|
||||||
#include "controllers/hotkeys/Hotkey.hpp"
|
|
||||||
#include "util/QStringHash.hpp"
|
#include "util/QStringHash.hpp"
|
||||||
|
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
@ -9,6 +8,7 @@
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
class HotkeyController;
|
class HotkeyController;
|
||||||
|
class Hotkey;
|
||||||
|
|
||||||
class HotkeyModel : public SignalVectorModel<std::shared_ptr<Hotkey>>
|
class HotkeyModel : public SignalVectorModel<std::shared_ptr<Hotkey>>
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#include "controllers/ignores/IgnoreController.hpp"
|
#include "controllers/ignores/IgnoreController.hpp"
|
||||||
|
|
||||||
|
#include "Application.hpp"
|
||||||
#include "common/QLogging.hpp"
|
#include "common/QLogging.hpp"
|
||||||
|
#include "controllers/accounts/AccountController.hpp"
|
||||||
#include "controllers/ignores/IgnorePhrase.hpp"
|
#include "controllers/ignores/IgnorePhrase.hpp"
|
||||||
#include "providers/twitch/TwitchAccount.hpp"
|
#include "providers/twitch/TwitchAccount.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "IgnoreModel.hpp"
|
#include "controllers/ignores/IgnoreModel.hpp"
|
||||||
|
|
||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
|
#include "controllers/ignores/IgnorePhrase.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
#include "util/StandardItemHelper.hpp"
|
#include "util/StandardItemHelper.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/SignalVectorModel.hpp"
|
#include "common/SignalVectorModel.hpp"
|
||||||
#include "controllers/ignores/IgnorePhrase.hpp"
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
class IgnorePhrase;
|
||||||
|
|
||||||
class IgnoreModel : public SignalVectorModel<IgnorePhrase>
|
class IgnoreModel : public SignalVectorModel<IgnorePhrase>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
#include "controllers/accounts/AccountController.hpp"
|
#include "controllers/accounts/AccountController.hpp"
|
||||||
#include "providers/twitch/TwitchAccount.hpp"
|
#include "providers/twitch/TwitchAccount.hpp"
|
||||||
|
#include "singletons/Settings.hpp"
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
@ -112,4 +113,10 @@ bool IgnorePhrase::containsEmote() const
|
||||||
return !this->emotes_.empty();
|
return !this->emotes_.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IgnorePhrase IgnorePhrase::createEmpty()
|
||||||
|
{
|
||||||
|
return IgnorePhrase(QString(), false, false,
|
||||||
|
getSettings()->ignoredPhraseReplace.getValue(), true);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace chatterino
|
} // namespace chatterino
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "messages/Emote.hpp"
|
#include "common/Aliases.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
|
||||||
#include "util/RapidjsonHelpers.hpp"
|
#include "util/RapidjsonHelpers.hpp"
|
||||||
#include "util/RapidJsonSerializeQString.hpp"
|
#include "util/RapidJsonSerializeQString.hpp"
|
||||||
|
|
||||||
|
@ -9,10 +8,14 @@
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
struct Emote;
|
||||||
|
using EmotePtr = std::shared_ptr<const Emote>;
|
||||||
|
|
||||||
class IgnorePhrase
|
class IgnorePhrase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -43,6 +46,8 @@ public:
|
||||||
|
|
||||||
bool containsEmote() const;
|
bool containsEmote() const;
|
||||||
|
|
||||||
|
static IgnorePhrase createEmpty();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString pattern_;
|
QString pattern_;
|
||||||
bool isRegex_;
|
bool isRegex_;
|
||||||
|
@ -82,10 +87,7 @@ struct Deserialize<chatterino::IgnorePhrase> {
|
||||||
if (!value.IsObject())
|
if (!value.IsObject())
|
||||||
{
|
{
|
||||||
PAJLADA_REPORT_ERROR(error)
|
PAJLADA_REPORT_ERROR(error)
|
||||||
return chatterino::IgnorePhrase(
|
return chatterino::IgnorePhrase::createEmpty();
|
||||||
QString(), false, false,
|
|
||||||
::chatterino::getSettings()->ignoredPhraseReplace.getValue(),
|
|
||||||
true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString _pattern;
|
QString _pattern;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "ModerationAction.hpp"
|
#include "controllers/moderationactions/ModerationAction.hpp"
|
||||||
|
|
||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
|
#include "debug/AssertInGuiThread.hpp"
|
||||||
#include "messages/Image.hpp"
|
#include "messages/Image.hpp"
|
||||||
#include "singletons/Resources.hpp"
|
#include "singletons/Resources.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "ModerationActionModel.hpp"
|
#include "controllers/moderationactions/ModerationActionModel.hpp"
|
||||||
|
|
||||||
|
#include "controllers/moderationactions/ModerationAction.hpp"
|
||||||
#include "util/StandardItemHelper.hpp"
|
#include "util/StandardItemHelper.hpp"
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/SignalVectorModel.hpp"
|
#include "common/SignalVectorModel.hpp"
|
||||||
#include "controllers/moderationactions/ModerationAction.hpp"
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
class ModerationAction;
|
||||||
|
|
||||||
class ModerationActionModel : public SignalVectorModel<ModerationAction>
|
class ModerationActionModel : public SignalVectorModel<ModerationAction>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "controllers/accounts/AccountController.hpp"
|
|
||||||
#include "util/RapidjsonHelpers.hpp"
|
#include "util/RapidjsonHelpers.hpp"
|
||||||
#include "util/RapidJsonSerializeQString.hpp"
|
#include "util/RapidJsonSerializeQString.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "NicknamesModel.hpp"
|
#include "controllers/nicknames/NicknamesModel.hpp"
|
||||||
|
|
||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
|
#include "controllers/nicknames/Nickname.hpp"
|
||||||
#include "providers/twitch/api/Helix.hpp"
|
#include "providers/twitch/api/Helix.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
#include "util/StandardItemHelper.hpp"
|
#include "util/StandardItemHelper.hpp"
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/SignalVectorModel.hpp"
|
#include "common/SignalVectorModel.hpp"
|
||||||
#include "controllers/nicknames/Nickname.hpp"
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
class Nickname;
|
||||||
|
|
||||||
class NicknamesModel : public SignalVectorModel<Nickname>
|
class NicknamesModel : public SignalVectorModel<Nickname>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -5,9 +5,11 @@
|
||||||
#include "common/Outcome.hpp"
|
#include "common/Outcome.hpp"
|
||||||
#include "common/QLogging.hpp"
|
#include "common/QLogging.hpp"
|
||||||
#include "controllers/notifications/NotificationModel.hpp"
|
#include "controllers/notifications/NotificationModel.hpp"
|
||||||
|
#include "messages/Message.hpp"
|
||||||
#include "providers/twitch/api/Helix.hpp"
|
#include "providers/twitch/api/Helix.hpp"
|
||||||
#include "providers/twitch/TwitchIrcServer.hpp"
|
#include "providers/twitch/TwitchIrcServer.hpp"
|
||||||
#include "providers/twitch/TwitchMessageBuilder.hpp"
|
#include "providers/twitch/TwitchMessageBuilder.hpp"
|
||||||
|
#include "singletons/Settings.hpp"
|
||||||
#include "singletons/Toasts.hpp"
|
#include "singletons/Toasts.hpp"
|
||||||
#include "singletons/WindowManager.hpp"
|
#include "singletons/WindowManager.hpp"
|
||||||
#include "util/Helpers.hpp"
|
#include "util/Helpers.hpp"
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "common/ChatterinoSetting.hpp"
|
||||||
#include "common/SignalVector.hpp"
|
#include "common/SignalVector.hpp"
|
||||||
#include "common/Singleton.hpp"
|
#include "common/Singleton.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
|
||||||
|
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/SignalVectorModel.hpp"
|
#include "common/SignalVectorModel.hpp"
|
||||||
#include "controllers/notifications/NotificationController.hpp"
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,11 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/SignalVectorModel.hpp"
|
#include "common/SignalVectorModel.hpp"
|
||||||
#include "controllers/notifications/NotificationController.hpp"
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
class MutedChannelController;
|
|
||||||
|
|
||||||
class MutedChannelModel : public SignalVectorModel<QString>
|
class MutedChannelModel : public SignalVectorModel<QString>
|
||||||
{
|
{
|
||||||
explicit MutedChannelModel(QObject *parent);
|
explicit MutedChannelModel(QObject *parent);
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/Atomic.hpp"
|
#include "common/Aliases.hpp"
|
||||||
#include "messages/Image.hpp"
|
|
||||||
#include "messages/ImageSet.hpp"
|
#include "messages/ImageSet.hpp"
|
||||||
|
|
||||||
#include <boost/optional.hpp>
|
#include <boost/optional.hpp>
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <mutex>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
@ -55,9 +55,6 @@ public:
|
||||||
EmoteMap::const_iterator findEmote(const QString &emoteNameHint,
|
EmoteMap::const_iterator findEmote(const QString &emoteNameHint,
|
||||||
const QString &emoteID) const;
|
const QString &emoteID) const;
|
||||||
};
|
};
|
||||||
using EmoteIdMap = std::unordered_map<EmoteId, EmotePtr>;
|
|
||||||
using WeakEmoteMap = std::unordered_map<EmoteName, std::weak_ptr<const Emote>>;
|
|
||||||
using WeakEmoteIdMap = std::unordered_map<EmoteId, std::weak_ptr<const Emote>>;
|
|
||||||
|
|
||||||
static const std::shared_ptr<const EmoteMap> EMPTY_EMOTE_MAP = std::make_shared<
|
static const std::shared_ptr<const EmoteMap> EMPTY_EMOTE_MAP = std::make_shared<
|
||||||
const EmoteMap>(); // NOLINT(cert-err58-cpp) -- assume this doesn't throw an exception
|
const EmoteMap>(); // NOLINT(cert-err58-cpp) -- assume this doesn't throw an exception
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
#include "common/Common.hpp"
|
#include "common/Common.hpp"
|
||||||
#include "common/NetworkRequest.hpp"
|
#include "common/NetworkRequest.hpp"
|
||||||
|
#include "common/NetworkResult.hpp"
|
||||||
|
#include "common/Outcome.hpp"
|
||||||
#include "common/QLogging.hpp"
|
#include "common/QLogging.hpp"
|
||||||
#include "debug/AssertInGuiThread.hpp"
|
#include "debug/AssertInGuiThread.hpp"
|
||||||
#include "debug/Benchmark.hpp"
|
#include "debug/Benchmark.hpp"
|
||||||
|
@ -347,6 +349,11 @@ ImagePtr Image::getEmpty()
|
||||||
return empty;
|
return empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImagePtr getEmptyImagePtr()
|
||||||
|
{
|
||||||
|
return Image::getEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
Image::Image()
|
Image::Image()
|
||||||
: empty_(true)
|
: empty_(true)
|
||||||
{
|
{
|
||||||
|
|
|
@ -102,6 +102,9 @@ private:
|
||||||
friend class ImageExpirationPool;
|
friend class ImageExpirationPool;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// forward-declarable function that calls Image::getEmpty() under the hood.
|
||||||
|
ImagePtr getEmptyImagePtr();
|
||||||
|
|
||||||
class ImageExpirationPool
|
class ImageExpirationPool
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "messages/ImageSet.hpp"
|
#include "messages/ImageSet.hpp"
|
||||||
|
|
||||||
|
#include "messages/Image.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
|
@ -1,15 +1,22 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "messages/Image.hpp"
|
#include "common/Aliases.hpp"
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
class Image;
|
||||||
|
using ImagePtr = std::shared_ptr<Image>;
|
||||||
|
ImagePtr getEmptyImagePtr();
|
||||||
|
|
||||||
class ImageSet
|
class ImageSet
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ImageSet();
|
ImageSet();
|
||||||
ImageSet(const ImagePtr &image1, const ImagePtr &image2 = Image::getEmpty(),
|
ImageSet(const ImagePtr &image1,
|
||||||
const ImagePtr &image3 = Image::getEmpty());
|
const ImagePtr &image2 = getEmptyImagePtr(),
|
||||||
|
const ImagePtr &image3 = getEmptyImagePtr());
|
||||||
ImageSet(const Url &image1, const Url &image2 = {}, const Url &image3 = {});
|
ImageSet(const Url &image1, const Url &image2 = {}, const Url &image3 = {});
|
||||||
|
|
||||||
void setImage1(const ImagePtr &image);
|
void setImage1(const ImagePtr &image);
|
||||||
|
|
|
@ -2,10 +2,14 @@
|
||||||
|
|
||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
#include "MessageElement.hpp"
|
#include "MessageElement.hpp"
|
||||||
|
#include "providers/colors/ColorProvider.hpp"
|
||||||
#include "providers/twitch/PubSubActions.hpp"
|
#include "providers/twitch/PubSubActions.hpp"
|
||||||
|
#include "providers/twitch/TwitchBadge.hpp"
|
||||||
|
#include "singletons/Settings.hpp"
|
||||||
#include "singletons/Theme.hpp"
|
#include "singletons/Theme.hpp"
|
||||||
#include "util/DebugCount.hpp"
|
#include "util/DebugCount.hpp"
|
||||||
#include "util/IrcHelpers.hpp"
|
#include "util/IrcHelpers.hpp"
|
||||||
|
#include "widgets/helper/ScrollbarHighlight.hpp"
|
||||||
|
|
||||||
using SBHighlight = chatterino::ScrollbarHighlight;
|
using SBHighlight = chatterino::ScrollbarHighlight;
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/FlagsEnum.hpp"
|
#include "common/FlagsEnum.hpp"
|
||||||
#include "providers/twitch/TwitchBadge.hpp"
|
|
||||||
#include "util/QStringHash.hpp"
|
#include "util/QStringHash.hpp"
|
||||||
#include "widgets/helper/ScrollbarHighlight.hpp"
|
|
||||||
|
|
||||||
#include <boost/noncopyable.hpp>
|
#include <boost/noncopyable.hpp>
|
||||||
|
#include <QColor>
|
||||||
#include <QTime>
|
#include <QTime>
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
|
@ -15,6 +14,8 @@
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
class MessageElement;
|
class MessageElement;
|
||||||
class MessageThread;
|
class MessageThread;
|
||||||
|
class Badge;
|
||||||
|
class ScrollbarHighlight;
|
||||||
|
|
||||||
enum class MessageFlag : int64_t {
|
enum class MessageFlag : int64_t {
|
||||||
None = 0LL,
|
None = 0LL,
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "messages/MessageElement.hpp"
|
#include "messages/MessageColor.hpp"
|
||||||
|
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
|
#include <QTime>
|
||||||
|
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
|
#include <memory>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
@ -16,6 +18,11 @@ struct AutomodInfoAction;
|
||||||
struct Message;
|
struct Message;
|
||||||
using MessagePtr = std::shared_ptr<const Message>;
|
using MessagePtr = std::shared_ptr<const Message>;
|
||||||
|
|
||||||
|
class MessageElement;
|
||||||
|
class TextElement;
|
||||||
|
struct Emote;
|
||||||
|
using EmotePtr = std::shared_ptr<const Emote>;
|
||||||
|
|
||||||
struct SystemMessageTag {
|
struct SystemMessageTag {
|
||||||
};
|
};
|
||||||
struct TimeoutMessageTag {
|
struct TimeoutMessageTag {
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
#include "messages/MessageElement.hpp"
|
#include "messages/MessageElement.hpp"
|
||||||
|
|
||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
|
#include "controllers/moderationactions/ModerationAction.hpp"
|
||||||
#include "debug/Benchmark.hpp"
|
#include "debug/Benchmark.hpp"
|
||||||
#include "messages/Emote.hpp"
|
#include "messages/Emote.hpp"
|
||||||
|
#include "messages/Image.hpp"
|
||||||
#include "messages/layouts/MessageLayoutContainer.hpp"
|
#include "messages/layouts/MessageLayoutContainer.hpp"
|
||||||
#include "messages/layouts/MessageLayoutElement.hpp"
|
#include "messages/layouts/MessageLayoutElement.hpp"
|
||||||
#include "providers/emoji/Emojis.hpp"
|
#include "providers/emoji/Emojis.hpp"
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
#pragma once
|
|
||||||
|
|
||||||
namespace chatterino {
|
|
||||||
|
|
||||||
} // namespace chatterino
|
|
|
@ -5,7 +5,10 @@
|
||||||
#include "controllers/highlights/HighlightController.hpp"
|
#include "controllers/highlights/HighlightController.hpp"
|
||||||
#include "controllers/ignores/IgnoreController.hpp"
|
#include "controllers/ignores/IgnoreController.hpp"
|
||||||
#include "controllers/ignores/IgnorePhrase.hpp"
|
#include "controllers/ignores/IgnorePhrase.hpp"
|
||||||
|
#include "controllers/nicknames/Nickname.hpp"
|
||||||
|
#include "messages/Message.hpp"
|
||||||
#include "messages/MessageElement.hpp"
|
#include "messages/MessageElement.hpp"
|
||||||
|
#include "providers/twitch/TwitchBadge.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
#include "singletons/WindowManager.hpp"
|
#include "singletons/WindowManager.hpp"
|
||||||
#include "util/Helpers.hpp"
|
#include "util/Helpers.hpp"
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#include "common/Aliases.hpp"
|
#include "common/Aliases.hpp"
|
||||||
#include "common/Outcome.hpp"
|
#include "common/Outcome.hpp"
|
||||||
#include "messages/MessageBuilder.hpp"
|
#include "messages/MessageBuilder.hpp"
|
||||||
#include "messages/MessageColor.hpp"
|
|
||||||
#include "providers/twitch/TwitchBadge.hpp"
|
|
||||||
|
|
||||||
#include <IrcMessage>
|
#include <IrcMessage>
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
|
@ -10,6 +10,9 @@
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
class Badge;
|
||||||
|
class Channel;
|
||||||
|
|
||||||
class SharedMessageBuilder : public MessageBuilder
|
class SharedMessageBuilder : public MessageBuilder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -3,8 +3,11 @@
|
||||||
#include "Application.hpp"
|
#include "Application.hpp"
|
||||||
#include "debug/Benchmark.hpp"
|
#include "debug/Benchmark.hpp"
|
||||||
#include "messages/layouts/MessageLayoutContainer.hpp"
|
#include "messages/layouts/MessageLayoutContainer.hpp"
|
||||||
|
#include "messages/layouts/MessageLayoutElement.hpp"
|
||||||
#include "messages/Message.hpp"
|
#include "messages/Message.hpp"
|
||||||
#include "messages/MessageElement.hpp"
|
#include "messages/MessageElement.hpp"
|
||||||
|
#include "messages/Selection.hpp"
|
||||||
|
#include "providers/colors/ColorProvider.hpp"
|
||||||
#include "singletons/Emotes.hpp"
|
#include "singletons/Emotes.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
#include "singletons/Theme.hpp"
|
#include "singletons/Theme.hpp"
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
#include "common/Common.hpp"
|
#include "common/Common.hpp"
|
||||||
#include "common/FlagsEnum.hpp"
|
#include "common/FlagsEnum.hpp"
|
||||||
#include "messages/layouts/MessageLayoutElement.hpp"
|
|
||||||
#include "messages/Selection.hpp"
|
|
||||||
|
|
||||||
#include <QPoint>
|
#include <QPoint>
|
||||||
#include <QRect>
|
#include <QRect>
|
||||||
|
@ -18,6 +16,8 @@ namespace chatterino {
|
||||||
enum class MessageFlag : int64_t;
|
enum class MessageFlag : int64_t;
|
||||||
enum class FirstWord { Neutral, RTL, LTR };
|
enum class FirstWord { Neutral, RTL, LTR };
|
||||||
using MessageFlags = FlagsEnum<MessageFlag>;
|
using MessageFlags = FlagsEnum<MessageFlag>;
|
||||||
|
class MessageLayoutElement;
|
||||||
|
struct Selection;
|
||||||
|
|
||||||
struct Margin {
|
struct Margin {
|
||||||
int top;
|
int top;
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
#include "common/FlagsEnum.hpp"
|
#include "common/FlagsEnum.hpp"
|
||||||
#include "messages/Link.hpp"
|
#include "messages/Link.hpp"
|
||||||
#include "messages/MessageColor.hpp"
|
|
||||||
#include "messages/MessageElement.hpp"
|
|
||||||
|
|
||||||
#include <boost/noncopyable.hpp>
|
#include <boost/noncopyable.hpp>
|
||||||
#include <pajlada/signals/signalholder.hpp>
|
#include <pajlada/signals/signalholder.hpp>
|
||||||
|
@ -22,6 +20,7 @@ class MessageElement;
|
||||||
class Image;
|
class Image;
|
||||||
using ImagePtr = std::shared_ptr<Image>;
|
using ImagePtr = std::shared_ptr<Image>;
|
||||||
enum class FontStyle : uint8_t;
|
enum class FontStyle : uint8_t;
|
||||||
|
enum class MessageElementFlag : int64_t;
|
||||||
|
|
||||||
class MessageLayoutElement : boost::noncopyable
|
class MessageLayoutElement : boost::noncopyable
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "messages/search/AuthorPredicate.hpp"
|
#include "messages/search/AuthorPredicate.hpp"
|
||||||
|
|
||||||
|
#include "messages/Message.hpp"
|
||||||
#include "util/Qt.hpp"
|
#include "util/Qt.hpp"
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
#include "messages/search/MessagePredicate.hpp"
|
#include "messages/search/MessagePredicate.hpp"
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
#include <QStringList>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#include "messages/search/BadgePredicate.hpp"
|
#include "messages/search/BadgePredicate.hpp"
|
||||||
|
|
||||||
|
#include "messages/Message.hpp"
|
||||||
|
#include "providers/twitch/TwitchBadge.hpp"
|
||||||
#include "util/Qt.hpp"
|
#include "util/Qt.hpp"
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
#include "messages/search/MessagePredicate.hpp"
|
#include "messages/search/MessagePredicate.hpp"
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
#include <QStringList>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "messages/search/ChannelPredicate.hpp"
|
#include "messages/search/ChannelPredicate.hpp"
|
||||||
|
|
||||||
|
#include "messages/Message.hpp"
|
||||||
#include "util/Qt.hpp"
|
#include "util/Qt.hpp"
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
#include "messages/search/MessagePredicate.hpp"
|
#include "messages/search/MessagePredicate.hpp"
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
#include <QStringList>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "messages/search/LinkPredicate.hpp"
|
#include "messages/search/LinkPredicate.hpp"
|
||||||
|
|
||||||
#include "common/LinkParser.hpp"
|
#include "common/LinkParser.hpp"
|
||||||
|
#include "messages/Message.hpp"
|
||||||
#include "util/Qt.hpp"
|
#include "util/Qt.hpp"
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
#include "messages/search/MessagePredicate.hpp"
|
#include "messages/search/MessagePredicate.hpp"
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/FlagsEnum.hpp"
|
#include "common/FlagsEnum.hpp"
|
||||||
|
#include "messages/Message.hpp"
|
||||||
#include "messages/search/MessagePredicate.hpp"
|
#include "messages/search/MessagePredicate.hpp"
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "messages/Message.hpp"
|
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
struct Message;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Abstract base class for message predicates.
|
* @brief Abstract base class for message predicates.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#include "RegexPredicate.hpp"
|
#include "RegexPredicate.hpp"
|
||||||
|
|
||||||
|
#include "messages/Message.hpp"
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
RegexPredicate::RegexPredicate(const QString ®ex, bool negate)
|
RegexPredicate::RegexPredicate(const QString ®ex, bool negate)
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
#include "messages/search/MessagePredicate.hpp"
|
#include "messages/search/MessagePredicate.hpp"
|
||||||
#include "QRegularExpression"
|
#include "QRegularExpression"
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#include "messages/search/SubstringPredicate.hpp"
|
#include "messages/search/SubstringPredicate.hpp"
|
||||||
|
|
||||||
|
#include "messages/Message.hpp"
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
SubstringPredicate::SubstringPredicate(const QString &search)
|
SubstringPredicate::SubstringPredicate(const QString &search)
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
#include "messages/search/MessagePredicate.hpp"
|
#include "messages/search/MessagePredicate.hpp"
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#include "messages/search/SubtierPredicate.hpp"
|
#include "messages/search/SubtierPredicate.hpp"
|
||||||
|
|
||||||
|
#include "messages/Message.hpp"
|
||||||
|
#include "providers/twitch/TwitchBadge.hpp"
|
||||||
#include "util/Qt.hpp"
|
#include "util/Qt.hpp"
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
#include "messages/search/MessagePredicate.hpp"
|
#include "messages/search/MessagePredicate.hpp"
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
#include <QStringList>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "IvrApi.hpp"
|
#include "IvrApi.hpp"
|
||||||
|
|
||||||
|
#include "common/NetworkResult.hpp"
|
||||||
#include "common/Outcome.hpp"
|
#include "common/Outcome.hpp"
|
||||||
#include "common/QLogging.hpp"
|
#include "common/QLogging.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/NetworkRequest.hpp"
|
#include "common/NetworkRequest.hpp"
|
||||||
#include "messages/Link.hpp"
|
|
||||||
#include "providers/twitch/TwitchEmotes.hpp"
|
#include "providers/twitch/TwitchEmotes.hpp"
|
||||||
|
|
||||||
#include <boost/noncopyable.hpp>
|
#include <boost/noncopyable.hpp>
|
||||||
|
#include <QJsonArray>
|
||||||
|
#include <QJsonObject>
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
#include "providers/LinkResolver.hpp"
|
#include "providers/LinkResolver.hpp"
|
||||||
|
|
||||||
#include "common/Common.hpp"
|
|
||||||
#include "common/Env.hpp"
|
#include "common/Env.hpp"
|
||||||
#include "common/NetworkRequest.hpp"
|
#include "common/NetworkRequest.hpp"
|
||||||
|
#include "common/NetworkResult.hpp"
|
||||||
|
#include "common/Outcome.hpp"
|
||||||
#include "messages/Image.hpp"
|
#include "messages/Image.hpp"
|
||||||
#include "messages/Link.hpp"
|
#include "messages/Link.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
|
|
|
@ -1,14 +1,17 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "messages/Image.hpp"
|
#include <QObject>
|
||||||
#include "messages/Link.hpp"
|
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
class Image;
|
||||||
|
struct Link;
|
||||||
|
using ImagePtr = std::shared_ptr<Image>;
|
||||||
|
|
||||||
class LinkResolver
|
class LinkResolver
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
#include "RecentMessagesApi.hpp"
|
#include "providers/RecentMessagesApi.hpp"
|
||||||
|
|
||||||
#include "common/Channel.hpp"
|
#include "common/Channel.hpp"
|
||||||
#include "common/Common.hpp"
|
#include "common/Common.hpp"
|
||||||
#include "common/Env.hpp"
|
#include "common/Env.hpp"
|
||||||
#include "common/NetworkRequest.hpp"
|
#include "common/NetworkRequest.hpp"
|
||||||
|
#include "common/NetworkResult.hpp"
|
||||||
#include "common/QLogging.hpp"
|
#include "common/QLogging.hpp"
|
||||||
|
#include "messages/Message.hpp"
|
||||||
#include "providers/twitch/IrcMessageHandler.hpp"
|
#include "providers/twitch/IrcMessageHandler.hpp"
|
||||||
#include "providers/twitch/TwitchChannel.hpp"
|
#include "providers/twitch/TwitchChannel.hpp"
|
||||||
#include "providers/twitch/TwitchMessageBuilder.hpp"
|
#include "providers/twitch/TwitchMessageBuilder.hpp"
|
||||||
|
@ -16,6 +18,7 @@
|
||||||
#include <QJsonArray>
|
#include <QJsonArray>
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
#include <QUrlQuery>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "providers/bttv/BttvEmotes.hpp"
|
#include "providers/bttv/BttvEmotes.hpp"
|
||||||
|
|
||||||
#include "common/Common.hpp"
|
|
||||||
#include "common/NetworkRequest.hpp"
|
#include "common/NetworkRequest.hpp"
|
||||||
|
#include "common/NetworkResult.hpp"
|
||||||
#include "common/QLogging.hpp"
|
#include "common/QLogging.hpp"
|
||||||
#include "messages/Emote.hpp"
|
#include "messages/Emote.hpp"
|
||||||
#include "messages/Image.hpp"
|
#include "messages/Image.hpp"
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue