diff --git a/src/controllers/ignores/IgnoreModel.cpp b/src/controllers/ignores/IgnoreModel.cpp index efa090290..cbecbb4d9 100644 --- a/src/controllers/ignores/IgnoreModel.cpp +++ b/src/controllers/ignores/IgnoreModel.cpp @@ -18,10 +18,11 @@ IgnorePhrase IgnoreModel::getItemFromRow(std::vector &row, { // key, regex - return IgnorePhrase{ - row[0]->data(Qt::DisplayRole).toString(), row[1]->data(Qt::CheckStateRole).toBool(), - row[3]->data(Qt::CheckStateRole).toBool(), row[4]->data(Qt::DisplayRole).toString(), - row[2]->data(Qt::CheckStateRole).toBool()}; + return IgnorePhrase{row[0]->data(Qt::DisplayRole).toString(), + row[1]->data(Qt::CheckStateRole).toBool(), + row[3]->data(Qt::CheckStateRole).toBool(), + row[4]->data(Qt::DisplayRole).toString(), + row[2]->data(Qt::CheckStateRole).toBool()}; } // turns a row in the model into a vector item diff --git a/src/messages/MessageElement.cpp b/src/messages/MessageElement.cpp index 49b2cadbc..ede398daa 100644 --- a/src/messages/MessageElement.cpp +++ b/src/messages/MessageElement.cpp @@ -159,13 +159,11 @@ void TextElement::addToContainer(MessageLayoutContainer &container, ->setLink(this->getLink()); e->setTrailingSpace(trailingSpace); - // If URL link was changed, + // If URL link was changed, // Should update it in MessageLayoutElement too! if (this->getLink().type == Link::Url) { this->linkChanged.connect( - [this, e]() { - e->setLink(this->getLink()); - }); + [this, e]() { e->setLink(this->getLink()); }); } return e; }; diff --git a/src/messages/layouts/MessageLayoutElement.cpp b/src/messages/layouts/MessageLayoutElement.cpp index 8a683a391..09bc2936c 100644 --- a/src/messages/layouts/MessageLayoutElement.cpp +++ b/src/messages/layouts/MessageLayoutElement.cpp @@ -78,7 +78,8 @@ ImageLayoutElement::ImageLayoutElement(MessageElement &creator, ImagePtr image, void ImageLayoutElement::addCopyTextToString(QString &str, int from, int to) const { - const auto *emoteElement = dynamic_cast(&this->getCreator()); + const auto *emoteElement = + dynamic_cast(&this->getCreator()); if (emoteElement) { str += emoteElement->getEmote()->getCopyString(); if (this->hasTrailingSpace()) { diff --git a/src/providers/LinkResolver.cpp b/src/providers/LinkResolver.cpp index f48834ef3..6697e6872 100644 --- a/src/providers/LinkResolver.cpp +++ b/src/providers/LinkResolver.cpp @@ -9,11 +9,11 @@ namespace chatterino { -void LinkResolver::getLinkInfo(const QString url, - std::function successCallback) +void LinkResolver::getLinkInfo( + const QString url, std::function successCallback) { - QString requestUrl("https://braize.pajlada.com/chatterino/link_resolver/" + - QUrl::toPercentEncoding(url, "", "/:")); + QString requestUrl("https://braize.pajlada.com/chatterino/link_resolver/" + + QUrl::toPercentEncoding(url, "", "/:")); NetworkRequest request(requestUrl); request.setCaller(QThread::currentThread()); @@ -31,7 +31,8 @@ void LinkResolver::getLinkInfo(const QString url, } else { response = root.value("message").toString(); } - successCallback(QUrl::fromPercentEncoding(response.toUtf8()), Link(Link::Url, linkString)); + successCallback(QUrl::fromPercentEncoding(response.toUtf8()), + Link(Link::Url, linkString)); return Success; }); diff --git a/src/widgets/settingspages/FeelPage.cpp b/src/widgets/settingspages/FeelPage.cpp index cab08ebc3..c74bbb679 100644 --- a/src/widgets/settingspages/FeelPage.cpp +++ b/src/widgets/settingspages/FeelPage.cpp @@ -50,12 +50,12 @@ FeelPage::FeelPage() form->addRow("Links:", this->createCheckBox("Open links only on double click", getSettings()->linksDoubleClickOnly)); - form->addRow("", - this->createCheckBox("Show link info in tooltips", - getSettings()->enableLinkInfoTooltip)); - form->addRow("", - this->createCheckBox("Auto unshort links (requires restart)", - getSettings()->enableUnshortLinks)); + form->addRow( + "", this->createCheckBox("Show link info in tooltips", + getSettings()->enableLinkInfoTooltip)); + form->addRow( + "", this->createCheckBox("Auto unshort links (requires restart)", + getSettings()->enableUnshortLinks)); } layout->addSpacing(16); diff --git a/src/widgets/settingspages/KeyboardSettingsPage.cpp b/src/widgets/settingspages/KeyboardSettingsPage.cpp index e66a984bf..14090e112 100644 --- a/src/widgets/settingspages/KeyboardSettingsPage.cpp +++ b/src/widgets/settingspages/KeyboardSettingsPage.cpp @@ -41,8 +41,7 @@ KeyboardSettingsPage::KeyboardSettingsPage() form->addRow(new QLabel("Ctrl + R"), new QLabel("Change channel")); form->addRow(new QLabel("Ctrl + F"), new QLabel("Search in current channel")); - form->addRow(new QLabel("Ctrl + E"), - new QLabel("Open Emote menu")); + form->addRow(new QLabel("Ctrl + E"), new QLabel("Open Emote menu")); } } // namespace chatterino diff --git a/src/widgets/settingspages/NotificationPage.cpp b/src/widgets/settingspages/NotificationPage.cpp index e07b6915c..5831bcc7b 100644 --- a/src/widgets/settingspages/NotificationPage.cpp +++ b/src/widgets/settingspages/NotificationPage.cpp @@ -32,8 +32,7 @@ NotificationPage::NotificationPage() { settings.emplace("Enable for selected channels"); settings.append(this->createCheckBox( - "Flash taskbar", - getSettings()->notificationFlashTaskbar)); + "Flash taskbar", getSettings()->notificationFlashTaskbar)); settings.append(this->createCheckBox( "Playsound (doesn't mute the Windows 8.x sound of toasts)", getSettings()->notificationPlaySound)); @@ -56,8 +55,7 @@ NotificationPage::NotificationPage() auto fileName = QFileDialog::getOpenFileName( this, tr("Open Sound"), "", tr("Audio Files (*.mp3 *.wav)")); - getSettings()->notificationPathSound = - fileName; + getSettings()->notificationPathSound = fileName; }); } diff --git a/src/widgets/splits/Split.cpp b/src/widgets/splits/Split.cpp index c5cd73cc1..499403d8f 100644 --- a/src/widgets/splits/Split.cpp +++ b/src/widgets/splits/Split.cpp @@ -107,7 +107,7 @@ Split::Split(QWidget *parent) this->view_->joinToChannel.connect([this](QString twitchChannel) { this->container_->appendNewSplit(false)->setChannel( - getApp()->twitch.server->getOrAddChannel(twitchChannel)); + getApp()->twitch.server->getOrAddChannel(twitchChannel)); }); this->input_->textChanged.connect([=](const QString &newText) { @@ -490,10 +490,12 @@ void Split::showViewerList() loadingLabel->hide(); for (int i = 0; i < jsonLabels.size(); i++) { - auto currentCategory = chattersObj.value(jsonLabels.at(i)).toArray(); - // If current category of chatters is empty, dont show this category. + auto currentCategory = + chattersObj.value(jsonLabels.at(i)).toArray(); + // If current category of chatters is empty, dont show this + // category. if (currentCategory.empty()) continue; - + chattersList->addItem(labelList.at(i)); foreach (const QJsonValue &v, currentCategory) chattersList->addItem(v.toString()); diff --git a/src/widgets/splits/SplitContainer.cpp b/src/widgets/splits/SplitContainer.cpp index bc79317bf..86fc7673a 100644 --- a/src/widgets/splits/SplitContainer.cpp +++ b/src/widgets/splits/SplitContainer.cpp @@ -101,7 +101,7 @@ void SplitContainer::resetMouseStatus() this->update(); } -Split* SplitContainer::appendNewSplit(bool openChannelNameDialog) +Split *SplitContainer::appendNewSplit(bool openChannelNameDialog) { assertInGuiThread();