Migrate to C++ 20 & switch to websocketpp develop branch (#4252)
* feat: c++ 20 * fix: c++ 20 deprecations * fix(msvc): warnings * chore: add changelog entry * fix: formatting * Update websocketpp to the `develop` branch * Specify other template type in FlagsEnum != operator * Remove the user of simple template ids in our websocketpp template class Also standardizes the file a bit by using nested namespaces, using pragma once * fix: turn `MAGIC_MESSAGE_SUFFIX` into a `QString` * hacky unhacky hacky const char hack Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -157,7 +157,7 @@ Split::Split(QWidget *parent)
|
||||
}
|
||||
});
|
||||
|
||||
this->input_->textChanged.connect([=](const QString &newText) {
|
||||
this->input_->textChanged.connect([this](const QString &newText) {
|
||||
if (getSettings()->showEmptyInput)
|
||||
{
|
||||
// We always show the input regardless of the text, so we can early out here
|
||||
@@ -754,7 +754,7 @@ void Split::showChangeChannelPopup(const char *dialogTitle, bool empty,
|
||||
dialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
dialog->setWindowTitle(dialogTitle);
|
||||
dialog->show();
|
||||
dialog->closed.connect([=] {
|
||||
dialog->closed.connect([=, this] {
|
||||
if (dialog->hasSeletedChannel())
|
||||
{
|
||||
this->setChannel(dialog->getSelectedChannel());
|
||||
@@ -1030,7 +1030,7 @@ void Split::showViewerList()
|
||||
NetworkRequest::twitchRequest("https://tmi.twitch.tv/group/user/" +
|
||||
this->getChannel()->getName() + "/chatters")
|
||||
.caller(this)
|
||||
.onSuccess([=](auto result) -> Outcome {
|
||||
.onSuccess([=, this](auto result) -> Outcome {
|
||||
auto obj = result.parseJson();
|
||||
QJsonObject chattersObj = obj.value("chatters").toObject();
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ Split *SplitContainer::appendNewSplit(bool openChannelNameDialog)
|
||||
|
||||
if (openChannelNameDialog)
|
||||
{
|
||||
split->showChangeChannelPopup("Open channel", true, [=](bool ok) {
|
||||
split->showChangeChannelPopup("Open channel", true, [=, this](bool ok) {
|
||||
if (!ok)
|
||||
{
|
||||
this->deleteSplit(split);
|
||||
@@ -1242,7 +1242,7 @@ void SplitContainer::Node::layout(bool addSpacing, float _scale,
|
||||
0.0001, this->getChildrensTotalFlex(isVertical));
|
||||
qreal totalSize = std::accumulate(
|
||||
this->children_.begin(), this->children_.end(), qreal(0),
|
||||
[=](int val, std::unique_ptr<Node> &node) {
|
||||
[=, this](int val, std::unique_ptr<Node> &node) {
|
||||
return val + std::max<qreal>(
|
||||
this->getSize(isVertical) /
|
||||
std::max<qreal>(0.0001, totalFlex) *
|
||||
|
||||
@@ -137,21 +137,22 @@ void SplitInput::initLayout()
|
||||
QObject::connect(this->ui_.textEdit, &QTextEdit::textChanged, this,
|
||||
&SplitInput::onTextChanged);
|
||||
|
||||
this->managedConnections_.managedConnect(app->fonts->fontChanged, [=]() {
|
||||
this->ui_.textEdit->setFont(
|
||||
app->fonts->getFont(FontStyle::ChatMedium, this->scale()));
|
||||
this->ui_.replyLabel->setFont(
|
||||
app->fonts->getFont(FontStyle::ChatMediumBold, this->scale()));
|
||||
});
|
||||
this->managedConnections_.managedConnect(
|
||||
app->fonts->fontChanged, [=, this]() {
|
||||
this->ui_.textEdit->setFont(
|
||||
app->fonts->getFont(FontStyle::ChatMedium, this->scale()));
|
||||
this->ui_.replyLabel->setFont(
|
||||
app->fonts->getFont(FontStyle::ChatMediumBold, this->scale()));
|
||||
});
|
||||
|
||||
// open emote popup
|
||||
QObject::connect(this->ui_.emoteButton, &EffectLabel::leftClicked, [=] {
|
||||
QObject::connect(this->ui_.emoteButton, &EffectLabel::leftClicked, [this] {
|
||||
this->openEmotePopup();
|
||||
});
|
||||
|
||||
// clear input and remove reply thread
|
||||
QObject::connect(this->ui_.cancelReplyButton, &EffectLabel::leftClicked,
|
||||
[=] {
|
||||
[this] {
|
||||
this->clearInput();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user