Migrate most dialogs to use QDialogButtonBox
This commit is contained in:
@ -76,8 +76,13 @@ SettingsDialog::SettingsDialog(QtHostInterface* host_interface, QWidget* parent
|
||||
m_ui.settingsContainer->setCurrentIndex(0);
|
||||
m_ui.helpText->setText(m_category_help_text[0]);
|
||||
connect(m_ui.settingsCategory, &QListWidget::currentRowChanged, this, &SettingsDialog::onCategoryCurrentRowChanged);
|
||||
connect(m_ui.closeButton, &QPushButton::clicked, this, &SettingsDialog::accept);
|
||||
connect(m_ui.restoreDefaultsButton, &QPushButton::clicked, this, &SettingsDialog::onRestoreDefaultsClicked);
|
||||
connect(m_ui.buttonBox, &QDialogButtonBox::rejected, this, &SettingsDialog::accept);
|
||||
connect(m_ui.buttonBox, &QDialogButtonBox::clicked, this, [this](QAbstractButton* button) {
|
||||
if (m_ui.buttonBox->buttonRole(button) == QDialogButtonBox::ResetRole)
|
||||
{
|
||||
onRestoreDefaultsClicked();
|
||||
}
|
||||
});
|
||||
|
||||
connect(m_console_settings, &ConsoleSettingsWidget::multitapModeChanged, m_controller_settings,
|
||||
&ControllerSettingsWidget::updateMultitapControllerTitles);
|
||||
|
||||
Reference in New Issue
Block a user