From 3a48f5db96e2459acb525a90579b6fec3ea5f9ea Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sun, 13 May 2018 18:29:57 +0200 Subject: [PATCH] Remove unused IgnoreMessagesPage widget --- chatterino.pro | 2 - src/widgets/settingsdialog.cpp | 2 - .../settingspages/ignoremessagespage.cpp | 40 ------------------- .../settingspages/ignoremessagespage.hpp | 21 ---------- 4 files changed, 65 deletions(-) delete mode 100644 src/widgets/settingspages/ignoremessagespage.cpp delete mode 100644 src/widgets/settingspages/ignoremessagespage.hpp diff --git a/chatterino.pro b/chatterino.pro index b45c964a7..31d78b1e2 100644 --- a/chatterino.pro +++ b/chatterino.pro @@ -154,7 +154,6 @@ SOURCES += \ src/widgets/settingspages/commandpage.cpp \ src/widgets/settingspages/emotespage.cpp \ src/widgets/settingspages/highlightingpage.cpp \ - src/widgets/settingspages/ignoremessagespage.cpp \ src/widgets/settingspages/ignoreuserspage.cpp \ src/widgets/settingspages/keyboardsettingspage.cpp \ src/widgets/settingspages/logspage.cpp \ @@ -289,7 +288,6 @@ HEADERS += \ src/widgets/settingspages/commandpage.hpp \ src/widgets/settingspages/emotespage.hpp \ src/widgets/settingspages/highlightingpage.hpp \ - src/widgets/settingspages/ignoremessagespage.hpp \ src/widgets/settingspages/ignoreuserspage.hpp \ src/widgets/settingspages/keyboardsettingspage.hpp \ src/widgets/settingspages/logspage.hpp \ diff --git a/src/widgets/settingsdialog.cpp b/src/widgets/settingsdialog.cpp index de603045c..a81eb9d8d 100644 --- a/src/widgets/settingsdialog.cpp +++ b/src/widgets/settingsdialog.cpp @@ -11,7 +11,6 @@ #include "widgets/settingspages/emotespage.hpp" #include "widgets/settingspages/externaltoolspage.hpp" #include "widgets/settingspages/highlightingpage.hpp" -#include "widgets/settingspages/ignoremessagespage.hpp" #include "widgets/settingspages/ignoreuserspage.hpp" #include "widgets/settingspages/keyboardsettingspage.hpp" #include "widgets/settingspages/logspage.hpp" @@ -89,7 +88,6 @@ void SettingsDialog::addTabs() this->addTab(new settingspages::CommandPage); // this->addTab(new settingspages::EmotesPage); this->addTab(new settingspages::HighlightingPage); - // this->addTab(new settingspages::IgnoreMessagesPage); this->addTab(new settingspages::IgnoreUsersPage); this->ui.tabContainer->addSpacing(16); diff --git a/src/widgets/settingspages/ignoremessagespage.cpp b/src/widgets/settingspages/ignoremessagespage.cpp deleted file mode 100644 index 714ef3351..000000000 --- a/src/widgets/settingspages/ignoremessagespage.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include "ignoremessagespage.hpp" - -#include "application.hpp" -#include "util/layoutcreator.hpp" - -#include -#include - -namespace chatterino { -namespace widgets { -namespace settingspages { - -IgnoreMessagesPage::IgnoreMessagesPage() - : SettingsPage("Ignore Messages", "") -{ - auto app = getApp(); - util::LayoutCreator layoutCreator(this); - auto layout = layoutCreator.setLayoutType(); - - layout.emplace("Ignored keywords:"); - QTextEdit *textEdit = layout.emplace().getElement(); - - textEdit->setPlainText(app->settings->ignoredKeywords); - - QObject::connect(textEdit, &QTextEdit::textChanged, - [this] { this->keywordsUpdated.start(200); }); - - QObject::connect(&this->keywordsUpdated, &QTimer::timeout, [textEdit, app] { - QString text = textEdit->toPlainText(); - - app->settings->ignoredKeywords = text; - }); - - // ---- misc - this->keywordsUpdated.setSingleShot(true); -} - -} // namespace settingspages -} // namespace widgets -} // namespace chatterino diff --git a/src/widgets/settingspages/ignoremessagespage.hpp b/src/widgets/settingspages/ignoremessagespage.hpp deleted file mode 100644 index 571b91528..000000000 --- a/src/widgets/settingspages/ignoremessagespage.hpp +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once - -#include "widgets/settingspages/settingspage.hpp" - -#include - -namespace chatterino { -namespace widgets { -namespace settingspages { - -class IgnoreMessagesPage : public SettingsPage -{ -public: - IgnoreMessagesPage(); - - QTimer keywordsUpdated; -}; - -} // namespace settingspages -} // namespace widgets -} // namespace chatterino