SkylandersPortalWindow: Directly connect slot in CreateSlotLayout

The interface corresponds with what QCheckBox::toggled wants, so we can
use the member function directly.
This commit is contained in:
Lioncash 2023-11-25 22:16:36 -05:00
parent 24c009f7ce
commit cdfabb4524
1 changed files with 1 additions and 1 deletions

View File

@ -157,7 +157,7 @@ QVBoxLayout* SkylanderPortalWindow::CreateSlotLayout()
m_enabled_checkbox = new QCheckBox(tr("Emulate Skylander Portal"), this);
m_enabled_checkbox->setChecked(Config::Get(Config::MAIN_EMULATE_SKYLANDER_PORTAL));
m_emulating = Config::Get(Config::MAIN_EMULATE_SKYLANDER_PORTAL);
connect(m_enabled_checkbox, &QCheckBox::toggled, [&](bool checked) { EmulatePortal(checked); });
connect(m_enabled_checkbox, &QCheckBox::toggled, this, &SkylanderPortalWindow::EmulatePortal);
checkbox_layout->addWidget(m_enabled_checkbox);
slot_layout->addLayout(checkbox_layout);