mirror of
https://github.com/obsproject/obs-studio.git
synced 2025-12-27 23:45:48 +00:00
frontend: Replace "=" capture with "this"
Implicit capture of 'this' with a capture default of '=' is deprecated in C++20. # Conflicts: # frontend/settings/OBSBasicSettings.cpp # frontend/settings/OBSHotkeyEdit.cpp # frontend/settings/OBSHotkeyWidget.cpp
This commit is contained in:
parent
4ad3df3af8
commit
25f4fc9e70
@ -128,7 +128,7 @@ OBSBasicProperties::OBSBasicProperties(QWidget *parent, OBSSource source_)
|
||||
obs_source_inc_active(sourceClone);
|
||||
obs_transition_set(sourceClone, sourceA);
|
||||
|
||||
auto updateCallback = [=]() {
|
||||
auto updateCallback = [this]() {
|
||||
OBSDataAutoRelease settings = obs_source_get_settings(source);
|
||||
obs_source_update(sourceClone, settings);
|
||||
|
||||
@ -167,7 +167,7 @@ void OBSBasicProperties::AddPreviewButton()
|
||||
|
||||
playButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
|
||||
auto play = [=]() {
|
||||
auto play = [this]() {
|
||||
OBSSource start;
|
||||
OBSSource end;
|
||||
|
||||
|
||||
@ -2405,9 +2405,9 @@ void OBSBasicSettings::LoadAudioSources()
|
||||
label->setMinimumSize(QSize(170, 0));
|
||||
label->setAlignment(Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter);
|
||||
connect(label, &OBSSourceLabel::Removed, this,
|
||||
[=]() { QMetaObject::invokeMethod(this, "ReloadAudioSources"); });
|
||||
[this]() { QMetaObject::invokeMethod(this, "ReloadAudioSources"); });
|
||||
connect(label, &OBSSourceLabel::Destroyed, this,
|
||||
[=]() { QMetaObject::invokeMethod(this, "ReloadAudioSources"); });
|
||||
[this]() { QMetaObject::invokeMethod(this, "ReloadAudioSources"); });
|
||||
|
||||
layout->addRow(label, form);
|
||||
return true;
|
||||
@ -2839,7 +2839,7 @@ void OBSBasicSettings::LoadHotkeySettings(obs_hotkey_id ignoreKey)
|
||||
HotkeysChanged();
|
||||
ScanDuplicateHotkeys(hotkeysLayout);
|
||||
});
|
||||
connect(hw, &OBSHotkeyWidget::SearchKey, this, [=](obs_key_combination_t combo) {
|
||||
connect(hw, &OBSHotkeyWidget::SearchKey, this, [this](obs_key_combination_t combo) {
|
||||
ui->hotkeyFilterSearch->setText("");
|
||||
ui->hotkeyFilterInput->HandleNewKey(combo);
|
||||
ui->hotkeyFilterInput->KeyChanged(combo);
|
||||
|
||||
@ -207,7 +207,7 @@ void OBSHotkeyEdit::CreateDupeIcon()
|
||||
{
|
||||
dupeIcon = addAction(settings->GetHotkeyConflictIcon(), ActionPosition::TrailingPosition);
|
||||
dupeIcon->setToolTip(QTStr("Basic.Settings.Hotkeys.DuplicateWarning"));
|
||||
QObject::connect(dupeIcon, &QAction::triggered, this, [=] { emit SearchKey(key); });
|
||||
connect(dupeIcon, &QAction::triggered, this, [this] { emit SearchKey(key); });
|
||||
dupeIcon->setVisible(false);
|
||||
}
|
||||
|
||||
|
||||
@ -150,7 +150,7 @@ void OBSHotkeyWidget::AddEdit(obs_key_combination combo, int idx)
|
||||
|
||||
QObject::connect(edit, &OBSHotkeyEdit::KeyChanged, this, [&](obs_key_combination) { emit KeyChanged(); });
|
||||
QObject::connect(edit, &OBSHotkeyEdit::SearchKey, this,
|
||||
[=](obs_key_combination combo) { emit SearchKey(combo); });
|
||||
[this](obs_key_combination combo) { emit SearchKey(combo); });
|
||||
}
|
||||
|
||||
void OBSHotkeyWidget::RemoveEdit(size_t idx, bool signal)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user