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
|
@ -171,12 +171,12 @@ void AudioPane::CreateWidgets()
|
|||
|
||||
void AudioPane::ConnectWidgets()
|
||||
{
|
||||
connect(m_backend_combo, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
this, &AudioPane::SaveSettings);
|
||||
connect(m_backend_combo, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||
&AudioPane::SaveSettings);
|
||||
connect(m_volume_slider, &QSlider::valueChanged, this, &AudioPane::SaveSettings);
|
||||
if (m_latency_control_supported)
|
||||
{
|
||||
connect(m_latency_spin, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this,
|
||||
connect(m_latency_spin, qOverload<int>(&QSpinBox::valueChanged), this,
|
||||
&AudioPane::SaveSettings);
|
||||
}
|
||||
connect(m_stretching_buffer_slider, &QSlider::valueChanged, this, &AudioPane::SaveSettings);
|
||||
|
@ -188,8 +188,7 @@ void AudioPane::ConnectWidgets()
|
|||
connect(m_dsp_interpreter, &QRadioButton::toggled, this, &AudioPane::SaveSettings);
|
||||
|
||||
#ifdef _WIN32
|
||||
connect(m_wasapi_device_combo,
|
||||
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
connect(m_wasapi_device_combo, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||
&AudioPane::SaveSettings);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue