mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-02 11:36:18 -04:00
Add clear functionality to group share settings
Settings in a group can now be cleared using a single button press on 'clear'.
This commit is contained in:
parent
c369130338
commit
f09f00a6b8
3 changed files with 20 additions and 0 deletions
|
@ -54,6 +54,7 @@ EditGroupWidgetKeeShare::EditGroupWidgetKeeShare(QWidget* parent)
|
|||
connect(m_ui->pathEdit, SIGNAL(editingFinished()), SLOT(selectPath()));
|
||||
connect(m_ui->pathSelectionButton, SIGNAL(pressed()), SLOT(launchPathSelectionDialog()));
|
||||
connect(m_ui->typeComboBox, SIGNAL(currentIndexChanged(int)), SLOT(selectType()));
|
||||
connect(m_ui->clearButton, SIGNAL(clicked(bool)), SLOT(clearInputs()));
|
||||
|
||||
connect(KeeShare::instance(), SIGNAL(activeChanged()), SLOT(showSharingState()));
|
||||
|
||||
|
@ -166,6 +167,17 @@ void EditGroupWidgetKeeShare::update()
|
|||
m_ui->togglePasswordButton->setChecked(false);
|
||||
}
|
||||
|
||||
void EditGroupWidgetKeeShare::clearInputs()
|
||||
{
|
||||
if (m_temporaryGroup) {
|
||||
KeeShare::setReferenceTo(m_temporaryGroup, KeeShareSettings::Reference());
|
||||
}
|
||||
m_ui->passwordEdit->clear();
|
||||
m_ui->pathEdit->clear();
|
||||
m_ui->typeComboBox->setCurrentIndex(KeeShareSettings::Inactive);
|
||||
m_ui->passwordGenerator->setVisible(false);
|
||||
}
|
||||
|
||||
void EditGroupWidgetKeeShare::togglePasswordGeneratorButton(bool checked)
|
||||
{
|
||||
m_ui->passwordGenerator->regeneratePassword();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue