diff --git a/src/gui/DatabaseOpenWidget.cpp b/src/gui/DatabaseOpenWidget.cpp index ec93953eb..e6e8d24ae 100644 --- a/src/gui/DatabaseOpenWidget.cpp +++ b/src/gui/DatabaseOpenWidget.cpp @@ -462,8 +462,8 @@ QSharedPointer DatabaseOpenWidget::buildDatabaseKey() legacyWarning.setDefaultButton(QMessageBox::Ok); legacyWarning.setCheckBox(new QCheckBox(tr("Don't show this warning again"))); - connect(legacyWarning.checkBox(), &QCheckBox::stateChanged, this, [](int state) { - config()->set(Config::Messages_NoLegacyKeyFileWarning, state == Qt::CheckState::Checked); + connect(legacyWarning.checkBox(), &QCheckBox::toggled, this, [](bool checked) { + config()->set(Config::Messages_NoLegacyKeyFileWarning, checked); }); legacyWarning.exec(); diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp index 8a29d1822..ef6a96635 100644 --- a/src/gui/DatabaseWidget.cpp +++ b/src/gui/DatabaseWidget.cpp @@ -1025,11 +1025,7 @@ void DatabaseWidget::openUrlForEntry(Entry* entry) auto checkbox = new QCheckBox(tr("Remember my choice"), &msgbox); msgbox.setCheckBox(checkbox); bool remember = false; - QObject::connect(checkbox, &QCheckBox::stateChanged, [&](int state) { - if (static_cast(state) == Qt::CheckState::Checked) { - remember = true; - } - }); + QObject::connect(checkbox, &QCheckBox::toggled, [&](bool checked) { remember = checked; }); int result = msgbox.exec(); launch = (result == QMessageBox::Yes); diff --git a/src/gui/entry/EditEntryWidget.cpp b/src/gui/entry/EditEntryWidget.cpp index e98c05fce..4a538f80a 100644 --- a/src/gui/entry/EditEntryWidget.cpp +++ b/src/gui/entry/EditEntryWidget.cpp @@ -573,24 +573,24 @@ void EditEntryWidget::setupEntryUpdate() connect(m_mainUi->urlEdit, SIGNAL(textChanged(QString)), this, SLOT(updateFaviconButtonEnable(QString))); #endif connect(m_mainUi->tagsList, SIGNAL(tagsEdited()), this, SLOT(setModified())); - connect(m_mainUi->expireCheck, SIGNAL(stateChanged(int)), this, SLOT(setModified())); + connect(m_mainUi->expireCheck, SIGNAL(toggled(bool)), this, SLOT(setModified())); connect(m_mainUi->expireDatePicker, SIGNAL(dateTimeChanged(QDateTime)), this, SLOT(setModified())); connect(m_mainUi->notesEdit, SIGNAL(textChanged()), this, SLOT(setModified())); // Advanced tab connect(m_advancedUi->attributesEdit, SIGNAL(textChanged()), this, SLOT(setModified())); - connect(m_advancedUi->protectAttributeButton, SIGNAL(stateChanged(int)), this, SLOT(setModified())); - connect(m_advancedUi->excludeReportsCheckBox, SIGNAL(stateChanged(int)), this, SLOT(setModified())); - connect(m_advancedUi->fgColorCheckBox, SIGNAL(stateChanged(int)), this, SLOT(setModified())); - connect(m_advancedUi->bgColorCheckBox, SIGNAL(stateChanged(int)), this, SLOT(setModified())); + connect(m_advancedUi->protectAttributeButton, SIGNAL(toggled(bool)), this, SLOT(setModified())); + connect(m_advancedUi->excludeReportsCheckBox, SIGNAL(toggled(bool)), this, SLOT(setModified())); + connect(m_advancedUi->fgColorCheckBox, SIGNAL(toggled(bool)), this, SLOT(setModified())); + connect(m_advancedUi->bgColorCheckBox, SIGNAL(toggled(bool)), this, SLOT(setModified())); connect(m_advancedUi->attachmentsWidget, SIGNAL(widgetUpdated()), this, SLOT(setModified())); // Icon tab connect(m_iconsWidget, SIGNAL(widgetUpdated()), this, SLOT(setModified())); // Auto-Type tab - connect(m_autoTypeUi->enableButton, SIGNAL(stateChanged(int)), this, SLOT(setModified())); - connect(m_autoTypeUi->customWindowSequenceButton, SIGNAL(stateChanged(int)), this, SLOT(setModified())); + connect(m_autoTypeUi->enableButton, SIGNAL(toggled(bool)), this, SLOT(setModified())); + connect(m_autoTypeUi->customWindowSequenceButton, SIGNAL(toggled(bool)), this, SLOT(setModified())); connect(m_autoTypeUi->inheritSequenceButton, SIGNAL(toggled(bool)), this, SLOT(setModified())); connect(m_autoTypeUi->customSequenceButton, SIGNAL(toggled(bool)), this, SLOT(setModified())); connect(m_autoTypeUi->windowSequenceEdit, SIGNAL(textChanged(QString)), this, SLOT(setModified())); @@ -608,10 +608,10 @@ void EditEntryWidget::setupEntryUpdate() connect(m_sshAgentUi->attachmentComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setModified())); connect(m_sshAgentUi->attachmentComboBox, SIGNAL(editTextChanged(QString)), this, SLOT(setModified())); connect(m_sshAgentUi->externalFileEdit, SIGNAL(textChanged(QString)), this, SLOT(setModified())); - connect(m_sshAgentUi->addKeyToAgentCheckBox, SIGNAL(stateChanged(int)), this, SLOT(setModified())); - connect(m_sshAgentUi->removeKeyFromAgentCheckBox, SIGNAL(stateChanged(int)), this, SLOT(setModified())); - connect(m_sshAgentUi->requireUserConfirmationCheckBox, SIGNAL(stateChanged(int)), this, SLOT(setModified())); - connect(m_sshAgentUi->lifetimeCheckBox, SIGNAL(stateChanged(int)), this, SLOT(setModified())); + connect(m_sshAgentUi->addKeyToAgentCheckBox, SIGNAL(toggled(bool)), this, SLOT(setModified())); + connect(m_sshAgentUi->removeKeyFromAgentCheckBox, SIGNAL(toggled(bool)), this, SLOT(setModified())); + connect(m_sshAgentUi->requireUserConfirmationCheckBox, SIGNAL(toggled(bool)), this, SLOT(setModified())); + connect(m_sshAgentUi->lifetimeCheckBox, SIGNAL(toggled(bool)), this, SLOT(setModified())); connect(m_sshAgentUi->lifetimeSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setModified())); } #endif diff --git a/src/gui/group/EditGroupWidget.cpp b/src/gui/group/EditGroupWidget.cpp index 43d20da07..e0509bfb9 100644 --- a/src/gui/group/EditGroupWidget.cpp +++ b/src/gui/group/EditGroupWidget.cpp @@ -114,7 +114,7 @@ void EditGroupWidget::setupModifiedTracking() // Group tab connect(m_mainUi->editName, SIGNAL(textChanged(QString)), SLOT(setModified())); connect(m_mainUi->editNotes, SIGNAL(textChanged()), SLOT(setModified())); - connect(m_mainUi->expireCheck, SIGNAL(stateChanged(int)), SLOT(setModified())); + connect(m_mainUi->expireCheck, SIGNAL(toggled(bool)), SLOT(setModified())); connect(m_mainUi->expireDatePicker, SIGNAL(dateTimeChanged(QDateTime)), SLOT(setModified())); connect(m_mainUi->searchComboBox, SIGNAL(currentIndexChanged(int)), SLOT(setModified())); connect(m_mainUi->autotypeComboBox, SIGNAL(currentIndexChanged(int)), SLOT(setModified())); diff --git a/src/gui/reports/ReportsWidgetBrowserStatistics.cpp b/src/gui/reports/ReportsWidgetBrowserStatistics.cpp index 63267d77f..00dc6132c 100644 --- a/src/gui/reports/ReportsWidgetBrowserStatistics.cpp +++ b/src/gui/reports/ReportsWidgetBrowserStatistics.cpp @@ -110,9 +110,9 @@ ReportsWidgetBrowserStatistics::ReportsWidgetBrowserStatistics(QWidget* parent) SLOT(customMenuRequested(QPoint))); connect( m_ui->browserStatisticsTableView, SIGNAL(doubleClicked(QModelIndex)), SLOT(emitEntryActivated(QModelIndex))); - connect(m_ui->showEntriesWithUrlOnlyCheckBox, SIGNAL(stateChanged(int)), this, SLOT(calculateBrowserStatistics())); - connect(m_ui->showAllowDenyCheckBox, SIGNAL(stateChanged(int)), this, SLOT(calculateBrowserStatistics())); - connect(m_ui->showExpired, SIGNAL(stateChanged(int)), this, SLOT(calculateBrowserStatistics())); + connect(m_ui->showEntriesWithUrlOnlyCheckBox, SIGNAL(toggled(bool)), this, SLOT(calculateBrowserStatistics())); + connect(m_ui->showAllowDenyCheckBox, SIGNAL(toggled(bool)), this, SLOT(calculateBrowserStatistics())); + connect(m_ui->showExpired, SIGNAL(toggled(bool)), this, SLOT(calculateBrowserStatistics())); new QShortcut(Qt::Key_Delete, this, SLOT(deleteSelectedEntries())); } diff --git a/src/gui/reports/ReportsWidgetHealthcheck.cpp b/src/gui/reports/ReportsWidgetHealthcheck.cpp index 1c34c2f36..a8b3ddbd2 100644 --- a/src/gui/reports/ReportsWidgetHealthcheck.cpp +++ b/src/gui/reports/ReportsWidgetHealthcheck.cpp @@ -152,8 +152,8 @@ ReportsWidgetHealthcheck::ReportsWidgetHealthcheck(QWidget* parent) connect(m_ui->healthcheckTableView, SIGNAL(customContextMenuRequested(QPoint)), SLOT(customMenuRequested(QPoint))); connect(m_ui->healthcheckTableView, SIGNAL(doubleClicked(QModelIndex)), SLOT(emitEntryActivated(QModelIndex))); - connect(m_ui->showExcluded, SIGNAL(stateChanged(int)), this, SLOT(calculateHealth())); - connect(m_ui->showExpired, SIGNAL(stateChanged(int)), this, SLOT(calculateHealth())); + connect(m_ui->showExcluded, SIGNAL(toggled(bool)), this, SLOT(calculateHealth())); + connect(m_ui->showExpired, SIGNAL(toggled(bool)), this, SLOT(calculateHealth())); new QShortcut(Qt::Key_Delete, this, SLOT(deleteSelectedEntries())); } diff --git a/src/gui/reports/ReportsWidgetHibp.cpp b/src/gui/reports/ReportsWidgetHibp.cpp index cc4876561..11e5fe82a 100644 --- a/src/gui/reports/ReportsWidgetHibp.cpp +++ b/src/gui/reports/ReportsWidgetHibp.cpp @@ -70,7 +70,7 @@ ReportsWidgetHibp::ReportsWidgetHibp(QWidget* parent) connect(m_ui->hibpTableView, SIGNAL(doubleClicked(QModelIndex)), SLOT(emitEntryActivated(QModelIndex))); connect(m_ui->hibpTableView, SIGNAL(customContextMenuRequested(QPoint)), SLOT(customMenuRequested(QPoint))); - connect(m_ui->showKnownBadCheckBox, SIGNAL(stateChanged(int)), this, SLOT(makeHibpTable())); + connect(m_ui->showKnownBadCheckBox, SIGNAL(toggled(bool)), this, SLOT(makeHibpTable())); #ifdef KPXC_FEATURE_NETWORK connect(&m_downloader, SIGNAL(hibpResult(QString, int)), SLOT(addHibpResult(QString, int))); connect(&m_downloader, SIGNAL(fetchFailed(QString)), SLOT(fetchFailed(QString))); diff --git a/src/gui/reports/ReportsWidgetPasskeys.cpp b/src/gui/reports/ReportsWidgetPasskeys.cpp index 831f4c721..4e65e238d 100644 --- a/src/gui/reports/ReportsWidgetPasskeys.cpp +++ b/src/gui/reports/ReportsWidgetPasskeys.cpp @@ -106,7 +106,7 @@ ReportsWidgetPasskeys::ReportsWidgetPasskeys(QWidget* parent) SIGNAL(selectionChanged(QItemSelection, QItemSelection)), this, SLOT(selectionChanged())); - connect(m_ui->showExpired, SIGNAL(stateChanged(int)), this, SLOT(updateEntries())); + connect(m_ui->showExpired, SIGNAL(toggled(bool)), this, SLOT(updateEntries())); connect(m_ui->exportButton, SIGNAL(clicked(bool)), this, SLOT(exportPasskey())); connect(m_ui->importButton, SIGNAL(clicked(bool)), this, SLOT(importPasskey())); diff --git a/src/sshagent/AgentSettingsWidget.cpp b/src/sshagent/AgentSettingsWidget.cpp index bdad6e30e..9fb3f1788 100644 --- a/src/sshagent/AgentSettingsWidget.cpp +++ b/src/sshagent/AgentSettingsWidget.cpp @@ -35,7 +35,7 @@ AgentSettingsWidget::AgentSettingsWidget(QWidget* parent) m_ui->sshAuthSockMessageWidget->setVisible(sshAgent()->isEnabled()); m_ui->sshAuthSockMessageWidget->setCloseButtonVisible(false); m_ui->sshAuthSockMessageWidget->setAutoHideTimeout(-1); - connect(m_ui->enableSSHAgentCheckBox, SIGNAL(stateChanged(int)), SLOT(toggleSettingsEnabled())); + connect(m_ui->enableSSHAgentCheckBox, SIGNAL(toggled(bool)), SLOT(toggleSettingsEnabled())); } AgentSettingsWidget::~AgentSettingsWidget()