mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
reformat
This commit is contained in:
parent
d79a8b81b1
commit
a2fb4ca104
9 changed files with 31 additions and 31 deletions
|
@ -18,9 +18,10 @@ IgnorePhrase IgnoreModel::getItemFromRow(std::vector<QStandardItem *> &row,
|
||||||
{
|
{
|
||||||
// key, regex
|
// key, regex
|
||||||
|
|
||||||
return IgnorePhrase{
|
return IgnorePhrase{row[0]->data(Qt::DisplayRole).toString(),
|
||||||
row[0]->data(Qt::DisplayRole).toString(), row[1]->data(Qt::CheckStateRole).toBool(),
|
row[1]->data(Qt::CheckStateRole).toBool(),
|
||||||
row[3]->data(Qt::CheckStateRole).toBool(), row[4]->data(Qt::DisplayRole).toString(),
|
row[3]->data(Qt::CheckStateRole).toBool(),
|
||||||
|
row[4]->data(Qt::DisplayRole).toString(),
|
||||||
row[2]->data(Qt::CheckStateRole).toBool()};
|
row[2]->data(Qt::CheckStateRole).toBool()};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -163,9 +163,7 @@ void TextElement::addToContainer(MessageLayoutContainer &container,
|
||||||
// Should update it in MessageLayoutElement too!
|
// Should update it in MessageLayoutElement too!
|
||||||
if (this->getLink().type == Link::Url) {
|
if (this->getLink().type == Link::Url) {
|
||||||
this->linkChanged.connect(
|
this->linkChanged.connect(
|
||||||
[this, e]() {
|
[this, e]() { e->setLink(this->getLink()); });
|
||||||
e->setLink(this->getLink());
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
return e;
|
return e;
|
||||||
};
|
};
|
||||||
|
|
|
@ -78,7 +78,8 @@ ImageLayoutElement::ImageLayoutElement(MessageElement &creator, ImagePtr image,
|
||||||
void ImageLayoutElement::addCopyTextToString(QString &str, int from,
|
void ImageLayoutElement::addCopyTextToString(QString &str, int from,
|
||||||
int to) const
|
int to) const
|
||||||
{
|
{
|
||||||
const auto *emoteElement = dynamic_cast<EmoteElement *>(&this->getCreator());
|
const auto *emoteElement =
|
||||||
|
dynamic_cast<EmoteElement *>(&this->getCreator());
|
||||||
if (emoteElement) {
|
if (emoteElement) {
|
||||||
str += emoteElement->getEmote()->getCopyString();
|
str += emoteElement->getEmote()->getCopyString();
|
||||||
if (this->hasTrailingSpace()) {
|
if (this->hasTrailingSpace()) {
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
void LinkResolver::getLinkInfo(const QString url,
|
void LinkResolver::getLinkInfo(
|
||||||
std::function<void(QString, Link)> successCallback)
|
const QString url, std::function<void(QString, Link)> successCallback)
|
||||||
{
|
{
|
||||||
QString requestUrl("https://braize.pajlada.com/chatterino/link_resolver/" +
|
QString requestUrl("https://braize.pajlada.com/chatterino/link_resolver/" +
|
||||||
QUrl::toPercentEncoding(url, "", "/:"));
|
QUrl::toPercentEncoding(url, "", "/:"));
|
||||||
|
@ -31,7 +31,8 @@ void LinkResolver::getLinkInfo(const QString url,
|
||||||
} else {
|
} else {
|
||||||
response = root.value("message").toString();
|
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;
|
return Success;
|
||||||
});
|
});
|
||||||
|
|
|
@ -50,11 +50,11 @@ FeelPage::FeelPage()
|
||||||
form->addRow("Links:",
|
form->addRow("Links:",
|
||||||
this->createCheckBox("Open links only on double click",
|
this->createCheckBox("Open links only on double click",
|
||||||
getSettings()->linksDoubleClickOnly));
|
getSettings()->linksDoubleClickOnly));
|
||||||
form->addRow("",
|
form->addRow(
|
||||||
this->createCheckBox("Show link info in tooltips",
|
"", this->createCheckBox("Show link info in tooltips",
|
||||||
getSettings()->enableLinkInfoTooltip));
|
getSettings()->enableLinkInfoTooltip));
|
||||||
form->addRow("",
|
form->addRow(
|
||||||
this->createCheckBox("Auto unshort links (requires restart)",
|
"", this->createCheckBox("Auto unshort links (requires restart)",
|
||||||
getSettings()->enableUnshortLinks));
|
getSettings()->enableUnshortLinks));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,8 +41,7 @@ KeyboardSettingsPage::KeyboardSettingsPage()
|
||||||
form->addRow(new QLabel("Ctrl + R"), new QLabel("Change channel"));
|
form->addRow(new QLabel("Ctrl + R"), new QLabel("Change channel"));
|
||||||
form->addRow(new QLabel("Ctrl + F"),
|
form->addRow(new QLabel("Ctrl + F"),
|
||||||
new QLabel("Search in current channel"));
|
new QLabel("Search in current channel"));
|
||||||
form->addRow(new QLabel("Ctrl + E"),
|
form->addRow(new QLabel("Ctrl + E"), new QLabel("Open Emote menu"));
|
||||||
new QLabel("Open Emote menu"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace chatterino
|
} // namespace chatterino
|
||||||
|
|
|
@ -32,8 +32,7 @@ NotificationPage::NotificationPage()
|
||||||
{
|
{
|
||||||
settings.emplace<QLabel>("Enable for selected channels");
|
settings.emplace<QLabel>("Enable for selected channels");
|
||||||
settings.append(this->createCheckBox(
|
settings.append(this->createCheckBox(
|
||||||
"Flash taskbar",
|
"Flash taskbar", getSettings()->notificationFlashTaskbar));
|
||||||
getSettings()->notificationFlashTaskbar));
|
|
||||||
settings.append(this->createCheckBox(
|
settings.append(this->createCheckBox(
|
||||||
"Playsound (doesn't mute the Windows 8.x sound of toasts)",
|
"Playsound (doesn't mute the Windows 8.x sound of toasts)",
|
||||||
getSettings()->notificationPlaySound));
|
getSettings()->notificationPlaySound));
|
||||||
|
@ -56,8 +55,7 @@ NotificationPage::NotificationPage()
|
||||||
auto fileName = QFileDialog::getOpenFileName(
|
auto fileName = QFileDialog::getOpenFileName(
|
||||||
this, tr("Open Sound"), "",
|
this, tr("Open Sound"), "",
|
||||||
tr("Audio Files (*.mp3 *.wav)"));
|
tr("Audio Files (*.mp3 *.wav)"));
|
||||||
getSettings()->notificationPathSound =
|
getSettings()->notificationPathSound = fileName;
|
||||||
fileName;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -490,8 +490,10 @@ void Split::showViewerList()
|
||||||
|
|
||||||
loadingLabel->hide();
|
loadingLabel->hide();
|
||||||
for (int i = 0; i < jsonLabels.size(); i++) {
|
for (int i = 0; i < jsonLabels.size(); i++) {
|
||||||
auto currentCategory = chattersObj.value(jsonLabels.at(i)).toArray();
|
auto currentCategory =
|
||||||
// If current category of chatters is empty, dont show this category.
|
chattersObj.value(jsonLabels.at(i)).toArray();
|
||||||
|
// If current category of chatters is empty, dont show this
|
||||||
|
// category.
|
||||||
if (currentCategory.empty()) continue;
|
if (currentCategory.empty()) continue;
|
||||||
|
|
||||||
chattersList->addItem(labelList.at(i));
|
chattersList->addItem(labelList.at(i));
|
||||||
|
|
|
@ -101,7 +101,7 @@ void SplitContainer::resetMouseStatus()
|
||||||
this->update();
|
this->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
Split* SplitContainer::appendNewSplit(bool openChannelNameDialog)
|
Split *SplitContainer::appendNewSplit(bool openChannelNameDialog)
|
||||||
{
|
{
|
||||||
assertInGuiThread();
|
assertInGuiThread();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue