ran clang-format on all files
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#include "AccountSwitchWidget.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "providers/twitch/Const.hpp"
|
||||
#include "controllers/accounts/AccountController.hpp"
|
||||
#include "providers/twitch/Const.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
#include "debug/Log.hpp"
|
||||
#include "singletons/ThemeManager.hpp"
|
||||
#include "singletons/WindowManager.hpp"
|
||||
#include "widgets/Window.hpp"
|
||||
#include "widgets/dialogs/SettingsDialog.hpp"
|
||||
#include "widgets/helper/NotebookButton.hpp"
|
||||
#include "widgets/helper/NotebookTab.hpp"
|
||||
#include "widgets/helper/Shortcut.hpp"
|
||||
#include "widgets/dialogs/SettingsDialog.hpp"
|
||||
#include "widgets/splits/SplitContainer.hpp"
|
||||
#include "widgets/Window.hpp"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
|
||||
@@ -16,7 +16,8 @@ QualityPopup::QualityPopup(const QString &_channelName, QStringList options)
|
||||
&QualityPopup::cancelButtonClicked);
|
||||
|
||||
this->ui_.buttonBox.addButton(&this->ui_.okButton, QDialogButtonBox::ButtonRole::AcceptRole);
|
||||
this->ui_.buttonBox.addButton(&this->ui_.cancelButton, QDialogButtonBox::ButtonRole::RejectRole);
|
||||
this->ui_.buttonBox.addButton(&this->ui_.cancelButton,
|
||||
QDialogButtonBox::ButtonRole::RejectRole);
|
||||
|
||||
this->ui_.selector.addItems(options);
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#include "UserInfoPopup.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "common/UrlFetch.hpp"
|
||||
#include "providers/twitch/TwitchChannel.hpp"
|
||||
#include "singletons/ResourceManager.hpp"
|
||||
#include "util/LayoutCreator.hpp"
|
||||
#include "util/PostToThread.hpp"
|
||||
#include "common/UrlFetch.hpp"
|
||||
#include "widgets/Label.hpp"
|
||||
#include "widgets/helper/Line.hpp"
|
||||
#include "widgets/helper/RippleEffectLabel.hpp"
|
||||
#include "widgets/Label.hpp"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QDesktopServices>
|
||||
@@ -86,8 +86,7 @@ UserInfoPopup::UserInfoPopup()
|
||||
|
||||
// userstate
|
||||
this->userStateChanged.connect([this, mod, unmod]() mutable {
|
||||
TwitchChannel *twitchChannel =
|
||||
dynamic_cast<TwitchChannel *>(this->channel_.get());
|
||||
TwitchChannel *twitchChannel = dynamic_cast<TwitchChannel *>(this->channel_.get());
|
||||
|
||||
if (twitchChannel) {
|
||||
qDebug() << this->userName_;
|
||||
@@ -111,8 +110,7 @@ UserInfoPopup::UserInfoPopup()
|
||||
auto timeout = moderation.emplace<TimeoutWidget>();
|
||||
|
||||
this->userStateChanged.connect([this, lineMod, timeout]() mutable {
|
||||
TwitchChannel *twitchChannel =
|
||||
dynamic_cast<TwitchChannel *>(this->channel_.get());
|
||||
TwitchChannel *twitchChannel = dynamic_cast<TwitchChannel *>(this->channel_.get());
|
||||
|
||||
if (twitchChannel) {
|
||||
lineMod->setVisible(twitchChannel->hasModRights());
|
||||
@@ -171,8 +169,7 @@ void UserInfoPopup::installEvents()
|
||||
|
||||
this->ui_.follow->setEnabled(false);
|
||||
if (this->ui_.follow->isChecked()) {
|
||||
twitchApiPut(requestUrl,
|
||||
[this](QJsonObject) { this->ui_.follow->setEnabled(true); });
|
||||
twitchApiPut(requestUrl, [this](QJsonObject) { this->ui_.follow->setEnabled(true); });
|
||||
} else {
|
||||
twitchApiDelete(requestUrl, [this] { this->ui_.follow->setEnabled(true); });
|
||||
}
|
||||
@@ -306,8 +303,7 @@ void UserInfoPopup::loadAvatar(const QUrl &url)
|
||||
UserInfoPopup::TimeoutWidget::TimeoutWidget()
|
||||
: BaseWidget(nullptr)
|
||||
{
|
||||
auto layout =
|
||||
LayoutCreator<TimeoutWidget>(this).setLayoutType<QHBoxLayout>().withoutMargin();
|
||||
auto layout = LayoutCreator<TimeoutWidget>(this).setLayoutType<QHBoxLayout>().withoutMargin();
|
||||
|
||||
QColor color1(255, 255, 255, 80);
|
||||
QColor color2(255, 255, 255, 0);
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
#include "ChannelView.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "debug/Benchmark.hpp"
|
||||
#include "debug/Log.hpp"
|
||||
#include "messages/layouts/MessageLayout.hpp"
|
||||
#include "messages/LimitedQueueSnapshot.hpp"
|
||||
#include "messages/Message.hpp"
|
||||
#include "messages/layouts/MessageLayout.hpp"
|
||||
#include "providers/twitch/TwitchServer.hpp"
|
||||
#include "singletons/SettingsManager.hpp"
|
||||
#include "singletons/ThemeManager.hpp"
|
||||
#include "singletons/WindowManager.hpp"
|
||||
#include "debug/Benchmark.hpp"
|
||||
#include "util/DistanceBetweenPoints.hpp"
|
||||
#include "widgets/splits/Split.hpp"
|
||||
#include "widgets/TooltipWidget.hpp"
|
||||
#include "widgets/dialogs/UserInfoPopup.hpp"
|
||||
#include "widgets/splits/Split.hpp"
|
||||
|
||||
#include <QClipboard>
|
||||
#include <QDebug>
|
||||
@@ -271,7 +271,8 @@ QString ChannelView::getSelectedText()
|
||||
{
|
||||
QString result = "";
|
||||
|
||||
chatterino::LimitedQueueSnapshot<MessageLayoutPtr> messagesSnapshot = this->getMessagesSnapshot();
|
||||
chatterino::LimitedQueueSnapshot<MessageLayoutPtr> messagesSnapshot =
|
||||
this->getMessagesSnapshot();
|
||||
|
||||
Selection _selection = this->selection_;
|
||||
|
||||
@@ -436,7 +437,7 @@ void ChannelView::setChannel(ChannelPtr newChannel)
|
||||
auto snapshot = this->messages.getSnapshot();
|
||||
if (index >= snapshot.getLength()) {
|
||||
Log("Tried to replace out of bounds message. Index: {}. Length: {}", index,
|
||||
snapshot.getLength());
|
||||
snapshot.getLength());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -882,8 +883,7 @@ void ChannelView::mouseReleaseEvent(QMouseEvent *event)
|
||||
if (this->isMouseDown_) {
|
||||
this->isMouseDown_ = false;
|
||||
|
||||
if (fabsf(distanceBetweenPoints(this->lastPressPosition_, event->screenPos())) >
|
||||
15.f) {
|
||||
if (fabsf(distanceBetweenPoints(this->lastPressPosition_, event->screenPos())) > 15.f) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
@@ -893,8 +893,8 @@ void ChannelView::mouseReleaseEvent(QMouseEvent *event)
|
||||
if (this->isRightMouseDown_) {
|
||||
this->isRightMouseDown_ = false;
|
||||
|
||||
if (fabsf(distanceBetweenPoints(this->lastRightPressPosition_,
|
||||
event->screenPos())) > 15.f) {
|
||||
if (fabsf(distanceBetweenPoints(this->lastRightPressPosition_, event->screenPos())) >
|
||||
15.f) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
#include "common/Channel.hpp"
|
||||
#include "messages/Image.hpp"
|
||||
#include "messages/layouts/MessageLayout.hpp"
|
||||
#include "messages/LimitedQueueSnapshot.hpp"
|
||||
#include "messages/MessageElement.hpp"
|
||||
#include "messages/Selection.hpp"
|
||||
#include "messages/layouts/MessageLayout.hpp"
|
||||
#include "widgets/BaseWidget.hpp"
|
||||
#include "widgets/helper/RippleEffectLabel.hpp"
|
||||
#include "widgets/Scrollbar.hpp"
|
||||
#include "widgets/helper/RippleEffectLabel.hpp"
|
||||
|
||||
#include <QPaintEvent>
|
||||
#include <QScroller>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "widgets/helper/NotebookButton.hpp"
|
||||
#include "singletons/ThemeManager.hpp"
|
||||
#include "widgets/helper/RippleEffectButton.hpp"
|
||||
#include "widgets/Notebook.hpp"
|
||||
#include "widgets/helper/RippleEffectButton.hpp"
|
||||
#include "widgets/splits/SplitContainer.hpp"
|
||||
|
||||
#include <QMouseEvent>
|
||||
|
||||
@@ -203,4 +203,4 @@ QCompleter *ResizingTextEdit::getCompleter() const
|
||||
return this->completer;
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace chatterino
|
||||
|
||||
@@ -41,4 +41,4 @@ private slots:
|
||||
void insertCompletion(const QString &completion);
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace chatterino
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "widgets/BaseWidget.hpp"
|
||||
#include "widgets/Label.hpp"
|
||||
#include "widgets/helper/RippleEffectButton.hpp"
|
||||
#include "widgets/helper/SignalLabel.hpp"
|
||||
#include "widgets/Label.hpp"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
|
||||
@@ -16,8 +16,7 @@ class SettingsDialogTab : public BaseWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SettingsDialogTab(SettingsDialog *dialog, SettingsPage *page,
|
||||
QString imageFileName);
|
||||
SettingsDialogTab(SettingsDialog *dialog, SettingsPage *page, QString imageFileName);
|
||||
|
||||
void setSelected(bool selected);
|
||||
SettingsPage *getSettingsPage();
|
||||
|
||||
@@ -36,4 +36,4 @@ void SignalLabel::mouseMoveEvent(QMouseEvent *event)
|
||||
event->ignore();
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace chatterino
|
||||
|
||||
@@ -29,4 +29,4 @@ protected:
|
||||
void mouseMoveEvent(QMouseEvent *event) override;
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace chatterino
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#include "AccountsPage.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "providers/twitch/Const.hpp"
|
||||
#include "controllers/accounts/AccountController.hpp"
|
||||
#include "controllers/accounts/AccountModel.hpp"
|
||||
#include "providers/twitch/Const.hpp"
|
||||
#include "util/LayoutCreator.hpp"
|
||||
#include "widgets/helper/EditableModelView.hpp"
|
||||
#include "widgets/dialogs/LoginDialog.hpp"
|
||||
#include "widgets/helper/EditableModelView.hpp"
|
||||
|
||||
#include <QDialogButtonBox>
|
||||
#include <QHeaderView>
|
||||
|
||||
@@ -40,8 +40,7 @@ CommandPage::CommandPage()
|
||||
view->setTitles({"Trigger", "Command"});
|
||||
view->getTableView()->horizontalHeader()->setStretchLastSection(true);
|
||||
view->addButtonPressed.connect([] {
|
||||
getApp()->commands->items.appendItem(
|
||||
Command{"/command", "I made a new command HeyGuys"});
|
||||
getApp()->commands->items.appendItem(Command{"/command", "I made a new command HeyGuys"});
|
||||
});
|
||||
|
||||
layout.append(this->createCheckBox("Also match the trigger at the end of the message",
|
||||
|
||||
@@ -44,8 +44,7 @@ HighlightingPage::HighlightingPage()
|
||||
auto highlights = tabs.appendTab(new QVBoxLayout, "Highlights");
|
||||
{
|
||||
EditableModelView *view =
|
||||
highlights
|
||||
.emplace<EditableModelView>(app->highlights->createModel(nullptr))
|
||||
highlights.emplace<EditableModelView>(app->highlights->createModel(nullptr))
|
||||
.getElement();
|
||||
|
||||
view->setTitles({"Pattern", "Flash taskbar", "Play sound", "Regex"});
|
||||
|
||||
@@ -64,8 +64,7 @@ IgnoreUsersPage::IgnoreUsersPage()
|
||||
auto messages = tabs.appendTab(new QVBoxLayout, "Messages");
|
||||
{
|
||||
EditableModelView *view =
|
||||
messages.emplace<EditableModelView>(app->ignores->createModel(nullptr))
|
||||
.getElement();
|
||||
messages.emplace<EditableModelView>(app->ignores->createModel(nullptr)).getElement();
|
||||
view->setTitles({"Pattern", "Regex"});
|
||||
view->getTableView()->horizontalHeader()->setSectionResizeMode(QHeaderView::Fixed);
|
||||
view->getTableView()->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch);
|
||||
@@ -77,8 +76,7 @@ IgnoreUsersPage::IgnoreUsersPage()
|
||||
});
|
||||
|
||||
view->addButtonPressed.connect([] {
|
||||
getApp()->ignores->phrases.appendItem(
|
||||
IgnorePhrase{"my phrase", false});
|
||||
getApp()->ignores->phrases.appendItem(IgnorePhrase{"my phrase", false});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "common/Common.hpp"
|
||||
#include "common/UrlFetch.hpp"
|
||||
#include "providers/twitch/EmoteValue.hpp"
|
||||
#include "providers/twitch/TwitchChannel.hpp"
|
||||
#include "providers/twitch/TwitchMessageBuilder.hpp"
|
||||
@@ -10,17 +11,16 @@
|
||||
#include "singletons/ThemeManager.hpp"
|
||||
#include "singletons/WindowManager.hpp"
|
||||
#include "util/StreamLink.hpp"
|
||||
#include "common/UrlFetch.hpp"
|
||||
#include "widgets/Window.hpp"
|
||||
#include "widgets/dialogs/QualityPopup.hpp"
|
||||
#include "widgets/dialogs/SelectChannelDialog.hpp"
|
||||
#include "widgets/dialogs/TextInputDialog.hpp"
|
||||
#include "widgets/dialogs/UserInfoPopup.hpp"
|
||||
#include "widgets/helper/DebugPopup.hpp"
|
||||
#include "widgets/helper/SearchPopup.hpp"
|
||||
#include "widgets/helper/Shortcut.hpp"
|
||||
#include "widgets/splits/SplitOverlay.hpp"
|
||||
#include "widgets/dialogs/QualityPopup.hpp"
|
||||
#include "widgets/dialogs/SelectChannelDialog.hpp"
|
||||
#include "widgets/splits/SplitContainer.hpp"
|
||||
#include "widgets/dialogs/TextInputDialog.hpp"
|
||||
#include "widgets/dialogs/UserInfoPopup.hpp"
|
||||
#include "widgets/Window.hpp"
|
||||
#include "widgets/splits/SplitOverlay.hpp"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
@@ -449,18 +449,18 @@ void Split::doOpenViewerList()
|
||||
}
|
||||
auto loadingLabel = new QLabel("Loading...");
|
||||
|
||||
twitchApiGet("https://tmi.twitch.tv/group/user/" + this->getChannel()->name + "/chatters",
|
||||
this, [=](QJsonObject obj) {
|
||||
QJsonObject chattersObj = obj.value("chatters").toObject();
|
||||
twitchApiGet("https://tmi.twitch.tv/group/user/" + this->getChannel()->name + "/chatters", this,
|
||||
[=](QJsonObject obj) {
|
||||
QJsonObject chattersObj = obj.value("chatters").toObject();
|
||||
|
||||
loadingLabel->hide();
|
||||
for (int i = 0; i < jsonLabels.size(); i++) {
|
||||
chattersList->addItem(labelList.at(i));
|
||||
foreach (const QJsonValue &v,
|
||||
chattersObj.value(jsonLabels.at(i)).toArray())
|
||||
chattersList->addItem(v.toString());
|
||||
}
|
||||
});
|
||||
loadingLabel->hide();
|
||||
for (int i = 0; i < jsonLabels.size(); i++) {
|
||||
chattersList->addItem(labelList.at(i));
|
||||
foreach (const QJsonValue &v,
|
||||
chattersObj.value(jsonLabels.at(i)).toArray())
|
||||
chattersList->addItem(v.toString());
|
||||
}
|
||||
});
|
||||
|
||||
searchBar->setPlaceholderText("Search User...");
|
||||
QObject::connect(searchBar, &QLineEdit::textEdited, this, [=]() {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "common/Channel.hpp"
|
||||
#include "messages/layouts/MessageLayout.hpp"
|
||||
#include "messages/layouts/MessageLayoutElement.hpp"
|
||||
#include "messages/LimitedQueueSnapshot.hpp"
|
||||
#include "messages/MessageElement.hpp"
|
||||
#include "common/NullablePtr.hpp"
|
||||
#include "common/SerializeCustom.hpp"
|
||||
#include "messages/LimitedQueueSnapshot.hpp"
|
||||
#include "messages/MessageElement.hpp"
|
||||
#include "messages/layouts/MessageLayout.hpp"
|
||||
#include "messages/layouts/MessageLayoutElement.hpp"
|
||||
#include "widgets/BaseWidget.hpp"
|
||||
#include "widgets/helper/ChannelView.hpp"
|
||||
#include "widgets/helper/RippleEffectLabel.hpp"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#include "widgets/splits/SplitContainer.hpp"
|
||||
#include "Application.hpp"
|
||||
#include "common/Common.hpp"
|
||||
#include "debug/AssertInGuiThread.hpp"
|
||||
#include "singletons/ThemeManager.hpp"
|
||||
#include "singletons/WindowManager.hpp"
|
||||
#include "debug/AssertInGuiThread.hpp"
|
||||
#include "util/Helpers.hpp"
|
||||
#include "util/LayoutCreator.hpp"
|
||||
#include "widgets/helper/NotebookTab.hpp"
|
||||
#include "widgets/Notebook.hpp"
|
||||
#include "widgets/helper/NotebookTab.hpp"
|
||||
#include "widgets/splits/Split.hpp"
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
#include "widgets/splits/SplitHeader.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "common/UrlFetch.hpp"
|
||||
#include "providers/twitch/TwitchChannel.hpp"
|
||||
#include "providers/twitch/TwitchServer.hpp"
|
||||
#include "singletons/ResourceManager.hpp"
|
||||
#include "singletons/ThemeManager.hpp"
|
||||
#include "util/LayoutCreator.hpp"
|
||||
#include "common/UrlFetch.hpp"
|
||||
#include "widgets/Label.hpp"
|
||||
#include "widgets/TooltipWidget.hpp"
|
||||
#include "widgets/splits/Split.hpp"
|
||||
#include "widgets/splits/SplitContainer.hpp"
|
||||
#include "widgets/TooltipWidget.hpp"
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QDrag>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "widgets/splits/SplitInput.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "common/UrlFetch.hpp"
|
||||
#include "controllers/commands/CommandController.hpp"
|
||||
#include "providers/twitch/TwitchChannel.hpp"
|
||||
#include "providers/twitch/TwitchServer.hpp"
|
||||
@@ -8,7 +9,6 @@
|
||||
#include "singletons/SettingsManager.hpp"
|
||||
#include "singletons/ThemeManager.hpp"
|
||||
#include "util/LayoutCreator.hpp"
|
||||
#include "common/UrlFetch.hpp"
|
||||
#include "widgets/Notebook.hpp"
|
||||
#include "widgets/splits/Split.hpp"
|
||||
#include "widgets/splits/SplitContainer.hpp"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "widgets/helper/ResizingTextEdit.hpp"
|
||||
#include "widgets/BaseWidget.hpp"
|
||||
#include "widgets/dialogs/EmotePopup.hpp"
|
||||
#include "widgets/helper/ResizingTextEdit.hpp"
|
||||
#include "widgets/helper/RippleEffectLabel.hpp"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
|
||||
Reference in New Issue
Block a user