diff --git a/src/gui/widgets/settings/ankisettings.cpp b/src/gui/widgets/settings/ankisettings.cpp index fa18dd9..3a721f3 100644 --- a/src/gui/widgets/settings/ankisettings.cpp +++ b/src/gui/widgets/settings/ankisettings.cpp @@ -112,7 +112,7 @@ AnkiSettings::AnkiSettings(QWidget *parent) initIcons(); connect( - m_ui->checkBoxEnabled, &QCheckBox::stateChanged, + m_ui->checkBoxEnabled, &QCheckBox::checkStateChanged, this, &AnkiSettings::enabledStateChanged ); connect( @@ -124,8 +124,8 @@ AnkiSettings::AnkiSettings(QWidget *parent) this, [=] { connectToClient(true); } ); connect( - m_ui->checkboxAdvanced, &QCheckBox::stateChanged, this, - [=] (int state) { + m_ui->checkboxAdvanced, &QCheckBox::checkStateChanged, this, + [=] (Qt::CheckState state) { m_ui->frameAdvanced->setVisible(state == Qt::Checked); } ); @@ -425,7 +425,7 @@ void AnkiSettings::updateModelFields(CardBuilder *cb, const QString &model) /* End AnkiConnect Actions */ /* Begin UI Management */ -void AnkiSettings::enabledStateChanged(int state) +void AnkiSettings::enabledStateChanged(Qt::CheckState state) { bool enabled = state == Qt::CheckState::Checked; m_ui->frameContent->setEnabled(enabled); diff --git a/src/gui/widgets/settings/ankisettings.h b/src/gui/widgets/settings/ankisettings.h index 2e20adb..b1f01fd 100644 --- a/src/gui/widgets/settings/ankisettings.h +++ b/src/gui/widgets/settings/ankisettings.h @@ -83,9 +83,9 @@ private Q_SLOTS: /** * Called when the Anki Integration Enabled checkbox is changed. * Enables/Disables widgets on the front end. - * @param state The checkbox state (Qt::CheckState). + * @param state The checkbox state. */ - void enabledStateChanged(int state); + void enabledStateChanged(Qt::CheckState state); /** * Connects to AnkiConnect and updates the decks, models, and fields. diff --git a/src/gui/widgets/settings/interfacesettings.cpp b/src/gui/widgets/settings/interfacesettings.cpp index c86c538..51c95be 100644 --- a/src/gui/widgets/settings/interfacesettings.cpp +++ b/src/gui/widgets/settings/interfacesettings.cpp @@ -58,8 +58,8 @@ InterfaceSettings::InterfaceSettings(QWidget *parent) [=] { askButtonColor(m_ui->buttonSubStroke, m_strokeColor); } ); - connect(m_ui->checkStyleSheets, &QCheckBox::stateChanged, this, - [=] (const int state) { + connect(m_ui->checkStyleSheets, &QCheckBox::checkStateChanged, this, + [=] (Qt::CheckState state) { m_ui->frameStyleSheets->setEnabled( state == Qt::CheckState::Checked );