mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
DolphinQt: Remove unnecessary qOverloads
qOverload is used to disambiguate pointers to overloaded functions, but most of the usages in the code base were with non-overloaded functions.
This commit is contained in:
@ -458,13 +458,12 @@ void IOWindow::ConnectWidgets()
|
||||
|
||||
connect(m_button_box, &QDialogButtonBox::clicked, this, &IOWindow::OnDialogButtonPressed);
|
||||
connect(m_devices_combo, &QComboBox::currentTextChanged, this, &IOWindow::OnDeviceChanged);
|
||||
connect(m_scalar_spinbox, qOverload<int>(&QSpinBox::valueChanged), this,
|
||||
&IOWindow::OnRangeChanged);
|
||||
connect(m_scalar_spinbox, &QSpinBox::valueChanged, this, &IOWindow::OnRangeChanged);
|
||||
|
||||
connect(m_expression_text, &QPlainTextEdit::textChanged,
|
||||
[this] { UpdateExpression(m_expression_text->toPlainText().toStdString()); });
|
||||
|
||||
connect(m_variables_combo, qOverload<int>(&QComboBox::activated), [this](int index) {
|
||||
connect(m_variables_combo, &QComboBox::activated, [this](int index) {
|
||||
if (index == 0)
|
||||
return;
|
||||
|
||||
@ -482,7 +481,7 @@ void IOWindow::ConnectWidgets()
|
||||
m_variables_combo->setCurrentIndex(0);
|
||||
});
|
||||
|
||||
connect(m_operators_combo, qOverload<int>(&QComboBox::activated), [this](int index) {
|
||||
connect(m_operators_combo, &QComboBox::activated, [this](int index) {
|
||||
if (index == 0)
|
||||
return;
|
||||
|
||||
@ -491,7 +490,7 @@ void IOWindow::ConnectWidgets()
|
||||
m_operators_combo->setCurrentIndex(0);
|
||||
});
|
||||
|
||||
connect(m_functions_combo, qOverload<int>(&QComboBox::activated), [this](int index) {
|
||||
connect(m_functions_combo, &QComboBox::activated, [this](int index) {
|
||||
if (index == 0)
|
||||
return;
|
||||
|
||||
|
@ -18,12 +18,11 @@ MappingDouble::MappingDouble(MappingWidget* parent, ControllerEmu::NumericSettin
|
||||
if (const auto ui_description = m_setting.GetUIDescription())
|
||||
setToolTip(tr(ui_description));
|
||||
|
||||
connect(this, qOverload<double>(&QDoubleSpinBox::valueChanged), this,
|
||||
[this, parent](double value) {
|
||||
m_setting.SetValue(value);
|
||||
ConfigChanged();
|
||||
parent->SaveSettings();
|
||||
});
|
||||
connect(this, &QDoubleSpinBox::valueChanged, this, [this, parent](double value) {
|
||||
m_setting.SetValue(value);
|
||||
ConfigChanged();
|
||||
parent->SaveSettings();
|
||||
});
|
||||
|
||||
connect(parent, &MappingWidget::ConfigChanged, this, &MappingDouble::ConfigChanged);
|
||||
connect(parent, &MappingWidget::Update, this, &MappingDouble::Update);
|
||||
|
@ -185,8 +185,7 @@ void MappingWindow::ConnectWidgets()
|
||||
connect(&Settings::Instance(), &Settings::DevicesChanged, this,
|
||||
&MappingWindow::OnGlobalDevicesChanged);
|
||||
connect(this, &MappingWindow::ConfigChanged, this, &MappingWindow::OnGlobalDevicesChanged);
|
||||
connect(m_devices_combo, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||
&MappingWindow::OnSelectDevice);
|
||||
connect(m_devices_combo, &QComboBox::currentIndexChanged, this, &MappingWindow::OnSelectDevice);
|
||||
|
||||
connect(m_reset_clear, &QPushButton::clicked, this, &MappingWindow::OnClearFieldsPressed);
|
||||
connect(m_reset_default, &QPushButton::clicked, this, &MappingWindow::OnDefaultFieldsPressed);
|
||||
@ -194,8 +193,7 @@ void MappingWindow::ConnectWidgets()
|
||||
connect(m_profiles_load, &QPushButton::clicked, this, &MappingWindow::OnLoadProfilePressed);
|
||||
connect(m_profiles_delete, &QPushButton::clicked, this, &MappingWindow::OnDeleteProfilePressed);
|
||||
|
||||
connect(m_profiles_combo, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||
&MappingWindow::OnSelectProfile);
|
||||
connect(m_profiles_combo, &QComboBox::currentIndexChanged, this, &MappingWindow::OnSelectProfile);
|
||||
connect(m_profiles_combo, &QComboBox::editTextChanged, this,
|
||||
&MappingWindow::OnProfileTextChanged);
|
||||
|
||||
|
@ -76,10 +76,9 @@ void WiimoteEmuGeneral::CreateMainLayout()
|
||||
|
||||
void WiimoteEmuGeneral::Connect()
|
||||
{
|
||||
connect(m_extension_combo, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||
connect(m_extension_combo, &QComboBox::currentIndexChanged, this,
|
||||
&WiimoteEmuGeneral::OnAttachmentChanged);
|
||||
connect(m_extension_combo, qOverload<int>(&QComboBox::activated), this,
|
||||
&WiimoteEmuGeneral::OnAttachmentSelected);
|
||||
connect(m_extension_combo, &QComboBox::activated, this, &WiimoteEmuGeneral::OnAttachmentSelected);
|
||||
connect(this, &MappingWidget::ConfigChanged, this, &WiimoteEmuGeneral::ConfigChanged);
|
||||
connect(this, &MappingWidget::Update, this, &WiimoteEmuGeneral::Update);
|
||||
}
|
||||
|
Reference in New Issue
Block a user