mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Resolve "implicit capture of ‘this’ via ‘[=]’ is deprecated in C++20" warning
This commit is contained in:
@ -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); });
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user