mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +00:00
DolphinQt: Use qOverload where applicable
Provides the same behvaior, but in a much more concise manner.
This commit is contained in:
parent
58de3c59ce
commit
19115c84dd
28 changed files with 96 additions and 127 deletions
|
@ -48,11 +48,11 @@ void PadMappingDialog::CreateWidgets()
|
|||
void PadMappingDialog::ConnectWidgets()
|
||||
{
|
||||
connect(m_button_box, &QDialogButtonBox::accepted, this, &QDialog::accept);
|
||||
for (auto& combo_group : {m_gc_boxes, m_wii_boxes})
|
||||
for (const auto& combo_group : {m_gc_boxes, m_wii_boxes})
|
||||
{
|
||||
for (auto& combo : combo_group)
|
||||
for (const auto& combo : combo_group)
|
||||
{
|
||||
connect(combo, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
connect(combo, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||
&PadMappingDialog::OnMappingChanged);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue