mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-20 00:51:32 -08:00
Fix warnings with COMPAT signal after Qt6 upgrade
* Fixes a specific warning that spams the console due to a deprecated signal that was used to indicate checkboxes state changed. * Converted all QCheckBox::stateChanged(int) to QCheckBox::toggled(bool). All functionality still works as intended.
This commit is contained in:
1 parent
52e2743b3a
commit
50738ec006
9 files changed
+23
-27
No files matched your search
@@ -462,8 +462,8 @@ QSharedPointer<CompositeKey> 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();
|
||||
|
||||
@@ -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<Qt::CheckState>(state) == Qt::CheckState::Checked) {
|
||||
remember = true;
|
||||
}
|
||||
});
|
||||
QObject::connect(checkbox, &QCheckBox::toggled, [&](bool checked) { remember = checked; });
|
||||
|
||||
int result = msgbox.exec();
|
||||
launch = (result == QMessageBox::Yes);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()));
|
||||
|
||||
@@ -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()));
|
||||
}
|
||||
|
||||
@@ -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()));
|
||||
}
|
||||
|
||||
@@ -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)));
|
||||
|
||||
@@ -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()));
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user