mirror of
https://git.citron-emu.org/Citron/Citron.git
synced 2025-01-31 13:16:55 +01:00
qt: Replace deprecated stateChanged with checkStateChanged
Updates QCheckBox signal connections to use checkStateChanged instead of the deprecated stateChanged signal. This change affects: - qt_controller.cpp - configure_filesystem.cpp - configure_input.cpp - configure_input_advanced.cpp - configure_system.cpp - configure_ui.cpp - shared_widget.cpp Also updates lambda signatures to use Qt::CheckState instead of int for the state parameter where needed.
This commit is contained in:
parent
c36151d6e3
commit
2e4db14bc1
7 changed files with 15 additions and 15 deletions
|
@ -184,7 +184,7 @@ QtControllerSelectorDialog::QtControllerSelectorDialog(
|
|||
CheckIfParametersMet();
|
||||
});
|
||||
|
||||
connect(connected_controller_checkboxes[i], &QCheckBox::stateChanged, [this, i](int state) {
|
||||
connect(connected_controller_checkboxes[i], &QCheckBox::checkStateChanged, [this, i](Qt::CheckState state) {
|
||||
player_groupboxes[i]->setChecked(state == Qt::Checked);
|
||||
UpdateControllerIcon(i);
|
||||
UpdateControllerState(i);
|
||||
|
|
|
@ -29,9 +29,9 @@ ConfigureFilesystem::ConfigureFilesystem(QWidget* parent)
|
|||
connect(ui->reset_game_list_cache, &QPushButton::pressed, this,
|
||||
&ConfigureFilesystem::ResetMetadata);
|
||||
|
||||
connect(ui->gamecard_inserted, &QCheckBox::stateChanged, this,
|
||||
connect(ui->gamecard_inserted, &QCheckBox::checkStateChanged, this,
|
||||
&ConfigureFilesystem::UpdateEnabledControls);
|
||||
connect(ui->gamecard_current_game, &QCheckBox::stateChanged, this,
|
||||
connect(ui->gamecard_current_game, &QCheckBox::checkStateChanged, this,
|
||||
&ConfigureFilesystem::UpdateEnabledControls);
|
||||
}
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ void ConfigureInput::Initialize(InputCommon::InputSubsystem* input_subsystem,
|
|||
&ConfigureInput::UpdateAllInputDevices);
|
||||
connect(player_controllers[i], &ConfigureInputPlayer::RefreshInputProfiles, this,
|
||||
&ConfigureInput::UpdateAllInputProfiles, Qt::QueuedConnection);
|
||||
connect(connected_controller_checkboxes[i], &QCheckBox::stateChanged, [this, i](int state) {
|
||||
connect(connected_controller_checkboxes[i], &QCheckBox::checkStateChanged, [this, i](Qt::CheckState state) {
|
||||
// Keep activated controllers synced with the "Connected Controllers" checkboxes
|
||||
player_controllers[i]->ConnectPlayer(state == Qt::Checked);
|
||||
});
|
||||
|
|
|
@ -74,13 +74,13 @@ ConfigureInputAdvanced::ConfigureInputAdvanced(Core::HID::HIDCore& hid_core_, QW
|
|||
}
|
||||
}
|
||||
|
||||
connect(ui->mouse_enabled, &QCheckBox::stateChanged, this,
|
||||
connect(ui->mouse_enabled, &QCheckBox::checkStateChanged, this,
|
||||
&ConfigureInputAdvanced::UpdateUIEnabled);
|
||||
connect(ui->debug_enabled, &QCheckBox::stateChanged, this,
|
||||
connect(ui->debug_enabled, &QCheckBox::checkStateChanged, this,
|
||||
&ConfigureInputAdvanced::UpdateUIEnabled);
|
||||
connect(ui->touchscreen_enabled, &QCheckBox::stateChanged, this,
|
||||
connect(ui->touchscreen_enabled, &QCheckBox::checkStateChanged, this,
|
||||
&ConfigureInputAdvanced::UpdateUIEnabled);
|
||||
connect(ui->enable_ring_controller, &QCheckBox::stateChanged, this,
|
||||
connect(ui->enable_ring_controller, &QCheckBox::checkStateChanged, this,
|
||||
&ConfigureInputAdvanced::UpdateUIEnabled);
|
||||
|
||||
connect(ui->debug_configure, &QPushButton::clicked, this,
|
||||
|
|
|
@ -83,7 +83,7 @@ ConfigureSystem::ConfigureSystem(Core::System& system_,
|
|||
|
||||
connect(combo_language, qOverload<int>(&QComboBox::currentIndexChanged), this, locale_check);
|
||||
connect(combo_region, qOverload<int>(&QComboBox::currentIndexChanged), this, locale_check);
|
||||
connect(checkbox_rtc, qOverload<int>(&QCheckBox::stateChanged), this, update_rtc_date);
|
||||
connect(checkbox_rtc, &QCheckBox::checkStateChanged, this, update_rtc_date);
|
||||
connect(date_rtc_offset, qOverload<int>(&QSpinBox::valueChanged), this, update_rtc_date);
|
||||
connect(date_rtc, &QDateTimeEdit::dateTimeChanged, this, update_date_offset);
|
||||
|
||||
|
|
|
@ -119,11 +119,11 @@ ConfigureUi::ConfigureUi(Core::System& system_, QWidget* parent)
|
|||
SetConfiguration();
|
||||
|
||||
// Force game list reload if any of the relevant settings are changed.
|
||||
connect(ui->show_add_ons, &QCheckBox::stateChanged, this, &ConfigureUi::RequestGameListUpdate);
|
||||
connect(ui->show_compat, &QCheckBox::stateChanged, this, &ConfigureUi::RequestGameListUpdate);
|
||||
connect(ui->show_size, &QCheckBox::stateChanged, this, &ConfigureUi::RequestGameListUpdate);
|
||||
connect(ui->show_types, &QCheckBox::stateChanged, this, &ConfigureUi::RequestGameListUpdate);
|
||||
connect(ui->show_play_time, &QCheckBox::stateChanged, this,
|
||||
connect(ui->show_add_ons, &QCheckBox::checkStateChanged, this, &ConfigureUi::RequestGameListUpdate);
|
||||
connect(ui->show_compat, &QCheckBox::checkStateChanged, this, &ConfigureUi::RequestGameListUpdate);
|
||||
connect(ui->show_size, &QCheckBox::checkStateChanged, this, &ConfigureUi::RequestGameListUpdate);
|
||||
connect(ui->show_types, &QCheckBox::checkStateChanged, this, &ConfigureUi::RequestGameListUpdate);
|
||||
connect(ui->show_play_time, &QCheckBox::checkStateChanged, this,
|
||||
&ConfigureUi::RequestGameListUpdate);
|
||||
connect(ui->game_icon_size_combobox, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
&ConfigureUi::RequestGameListUpdate);
|
||||
|
|
|
@ -699,7 +699,7 @@ void Widget::SetupComponent(const QString& label, std::function<void()>& load_fu
|
|||
restore_func();
|
||||
}
|
||||
};
|
||||
connect(checkbox, &QCheckBox::stateChanged, reset);
|
||||
connect(checkbox, &QCheckBox::checkStateChanged, reset);
|
||||
reset(checkbox->checkState());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue