mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-06 08:09:19 +00:00
Resolve "implicit capture of ‘this’ via ‘[=]’ is deprecated in C++20" warning
This commit is contained in:
parent
e638bb658f
commit
e54818e60d
10 changed files with 29 additions and 23 deletions
|
@ -85,7 +85,7 @@ MenuBar::MenuBar(QWidget* parent) : QMenuBar(parent)
|
|||
AddHelpMenu();
|
||||
|
||||
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this,
|
||||
[=](Core::State state) { OnEmulationStateChanged(state); });
|
||||
[=, this](Core::State state) { OnEmulationStateChanged(state); });
|
||||
connect(Host::GetInstance(), &Host::UpdateDisasmDialog, this,
|
||||
[this] { OnEmulationStateChanged(Core::GetState()); });
|
||||
|
||||
|
@ -338,7 +338,7 @@ void MenuBar::AddStateLoadMenu(QMenu* emu_menu)
|
|||
{
|
||||
QAction* action = m_state_load_slots_menu->addAction(QString{});
|
||||
|
||||
connect(action, &QAction::triggered, this, [=]() { emit StateLoadSlotAt(i); });
|
||||
connect(action, &QAction::triggered, this, [=, this]() { emit StateLoadSlotAt(i); });
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -355,7 +355,7 @@ void MenuBar::AddStateSaveMenu(QMenu* emu_menu)
|
|||
{
|
||||
QAction* action = m_state_save_slots_menu->addAction(QString{});
|
||||
|
||||
connect(action, &QAction::triggered, this, [=]() { emit StateSaveSlotAt(i); });
|
||||
connect(action, &QAction::triggered, this, [=, this]() { emit StateSaveSlotAt(i); });
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -372,7 +372,7 @@ void MenuBar::AddStateSlotMenu(QMenu* emu_menu)
|
|||
if (Settings::Instance().GetStateSlot() == i)
|
||||
action->setChecked(true);
|
||||
|
||||
connect(action, &QAction::triggered, this, [=]() { emit SetStateSlot(i); });
|
||||
connect(action, &QAction::triggered, this, [=, this]() { emit SetStateSlot(i); });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue