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:
@@ -1,6 +1,8 @@
|
||||
#include "controllers/ignores/IgnoreController.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "common/QLogging.hpp"
|
||||
#include "controllers/accounts/AccountController.hpp"
|
||||
#include "controllers/ignores/IgnorePhrase.hpp"
|
||||
#include "providers/twitch/TwitchAccount.hpp"
|
||||
#include "singletons/Settings.hpp"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "IgnoreModel.hpp"
|
||||
#include "controllers/ignores/IgnoreModel.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "controllers/ignores/IgnorePhrase.hpp"
|
||||
#include "singletons/Settings.hpp"
|
||||
#include "util/StandardItemHelper.hpp"
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "common/SignalVectorModel.hpp"
|
||||
#include "controllers/ignores/IgnorePhrase.hpp"
|
||||
|
||||
#include <QObject>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
class IgnorePhrase;
|
||||
|
||||
class IgnoreModel : public SignalVectorModel<IgnorePhrase>
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "Application.hpp"
|
||||
#include "controllers/accounts/AccountController.hpp"
|
||||
#include "providers/twitch/TwitchAccount.hpp"
|
||||
#include "singletons/Settings.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
@@ -112,4 +113,10 @@ bool IgnorePhrase::containsEmote() const
|
||||
return !this->emotes_.empty();
|
||||
}
|
||||
|
||||
IgnorePhrase IgnorePhrase::createEmpty()
|
||||
{
|
||||
return IgnorePhrase(QString(), false, false,
|
||||
getSettings()->ignoredPhraseReplace.getValue(), true);
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "messages/Emote.hpp"
|
||||
#include "singletons/Settings.hpp"
|
||||
#include "common/Aliases.hpp"
|
||||
#include "util/RapidjsonHelpers.hpp"
|
||||
#include "util/RapidJsonSerializeQString.hpp"
|
||||
|
||||
@@ -9,10 +8,14 @@
|
||||
#include <QRegularExpression>
|
||||
#include <QString>
|
||||
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
struct Emote;
|
||||
using EmotePtr = std::shared_ptr<const Emote>;
|
||||
|
||||
class IgnorePhrase
|
||||
{
|
||||
public:
|
||||
@@ -43,6 +46,8 @@ public:
|
||||
|
||||
bool containsEmote() const;
|
||||
|
||||
static IgnorePhrase createEmpty();
|
||||
|
||||
private:
|
||||
QString pattern_;
|
||||
bool isRegex_;
|
||||
@@ -82,10 +87,7 @@ struct Deserialize<chatterino::IgnorePhrase> {
|
||||
if (!value.IsObject())
|
||||
{
|
||||
PAJLADA_REPORT_ERROR(error)
|
||||
return chatterino::IgnorePhrase(
|
||||
QString(), false, false,
|
||||
::chatterino::getSettings()->ignoredPhraseReplace.getValue(),
|
||||
true);
|
||||
return chatterino::IgnorePhrase::createEmpty();
|
||||
}
|
||||
|
||||
QString _pattern;
|
||||
|
||||
Reference in New Issue
Block a user