DolphinQt: Use qOverload where applicable

Provides the same behvaior, but in a much more concise manner.
This commit is contained in:
Lioncash
2019-07-30 09:35:46 -04:00
committed by Léo Lam
parent 58de3c59ce
commit 19115c84dd
28 changed files with 96 additions and 127 deletions

View File

@ -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
}