From e4b0746a5d5142cc16c39dca8decc757c5319ad7 Mon Sep 17 00:00:00 2001 From: Alexandre Petit <62973006+AlexpFr@users.noreply.github.com> Date: Wed, 18 Feb 2026 14:21:07 +0100 Subject: [PATCH] Fix sshAgent casacading calls with QSignalBlocker --- src/gui/entry/EditEntryWidget.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/gui/entry/EditEntryWidget.cpp b/src/gui/entry/EditEntryWidget.cpp index 2a1dde612..f29e0b8af 100644 --- a/src/gui/entry/EditEntryWidget.cpp +++ b/src/gui/entry/EditEntryWidget.cpp @@ -41,6 +41,7 @@ #include "core/PasswordGenerator.h" #include "core/TimeDelta.h" #ifdef WITH_XC_SSHAGENT +#include #include "sshagent/OpenSSHKey.h" #include "sshagent/OpenSSHKeyGenDialog.h" #include "sshagent/SSHAgent.h" @@ -630,6 +631,7 @@ void EditEntryWidget::setSSHAgentSettings() m_sshAgentUi->requireUserConfirmationCheckBox->setChecked(m_sshAgentSettings.useConfirmConstraintWhenAdding()); m_sshAgentUi->lifetimeCheckBox->setChecked(m_sshAgentSettings.useLifetimeConstraintWhenAdding()); m_sshAgentUi->lifetimeSpinBox->setValue(m_sshAgentSettings.lifetimeConstraintDuration()); + QSignalBlocker sshAgent_attachmentComboBox_Blocker(m_sshAgentUi->attachmentComboBox); m_sshAgentUi->attachmentComboBox->clear(); m_sshAgentUi->addToAgentButton->setEnabled(false); m_sshAgentUi->removeFromAgentButton->setEnabled(false); @@ -666,6 +668,7 @@ void EditEntryWidget::updateSSHAgentAttachments() setSSHAgentSettings(); } + QSignalBlocker sshAgent_attachmentComboBox_Blocker(m_sshAgentUi->attachmentComboBox); m_sshAgentUi->attachmentComboBox->clear(); m_sshAgentUi->attachmentComboBox->addItem(""); @@ -678,6 +681,7 @@ void EditEntryWidget::updateSSHAgentAttachments() } m_sshAgentUi->attachmentComboBox->setCurrentText(m_sshAgentSettings.attachmentName()); + QSignalBlocker sshAgent_externalFileEdit_Blocker(m_sshAgentUi->externalFileEdit); m_sshAgentUi->externalFileEdit->setText(m_sshAgentSettings.fileName()); if (m_sshAgentSettings.selectedType() == "attachment") { @@ -960,6 +964,9 @@ void EditEntryWidget::loadEntry(Entry* entry, void EditEntryWidget::setForms(Entry* entry, bool restore) { +#ifdef WITH_XC_SSHAGENT + QSignalBlocker attachmentsBlocker(m_attachments.data()); +#endif m_attachments->copyDataFrom(entry->attachments()); m_customData->copyDataFrom(entry->customData()); @@ -1405,6 +1412,9 @@ void EditEntryWidget::clear() m_mainUi->notesEdit->clear(); m_entryAttributes->clear(); +#ifdef WITH_XC_SSHAGENT + QSignalBlocker attachmentsBlocker(m_attachments.data()); +#endif m_attachments->clear(); m_customData->clear(); m_autoTypeAssoc->clear();