mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-20 18:56:07 -05:00
Remove duplicate menu entries to copy username and password.
This commit is contained in:
parent
af98c2636c
commit
34f12ac39c
4 changed files with 21 additions and 8 deletions
|
|
@ -214,10 +214,19 @@ void MainWindow::updateCopyAttributesMenu()
|
|||
return;
|
||||
}
|
||||
|
||||
m_ui->menuEntryCopyAttribute->clear();
|
||||
Q_FOREACH (QAction* action, m_ui->menuEntryCopyAttribute->actions()) {
|
||||
if (action != m_ui->actionEntryCopyPassword && action != m_ui->actionEntryCopyUsername) {
|
||||
m_ui->menuEntryCopyAttribute->removeAction(action);
|
||||
}
|
||||
}
|
||||
|
||||
Entry* entry = dbWidget->entryView()->currentEntry();
|
||||
|
||||
Q_FOREACH (const QString& key, EntryAttributes::DefaultAttributes) {
|
||||
QStringList defaultAttributesWithoutPasswordAndUsername = EntryAttributes::DefaultAttributes;
|
||||
defaultAttributesWithoutPasswordAndUsername.removeOne(EntryAttributes::PasswordKey);
|
||||
defaultAttributesWithoutPasswordAndUsername.removeOne(EntryAttributes::UserNameKey);
|
||||
|
||||
Q_FOREACH (const QString& key, defaultAttributesWithoutPasswordAndUsername) {
|
||||
QAction* action = m_ui->menuEntryCopyAttribute->addAction(key);
|
||||
m_copyAdditionalAttributeActions->addAction(action);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue