mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-27 16:29:44 -05:00
Auto-Type: Resolve username/password when copying to clipboard
* Fix #3882 * Add nullptr checks as well
This commit is contained in:
parent
3c2abaaa82
commit
17326dc3ec
@ -281,16 +281,25 @@ void AutoTypeSelectDialog::buildActionMenu()
|
|||||||
});
|
});
|
||||||
|
|
||||||
connect(copyUsernameAction, &QAction::triggered, this, [&] {
|
connect(copyUsernameAction, &QAction::triggered, this, [&] {
|
||||||
clipboard()->setText(m_ui->view->currentMatch().first->username());
|
auto entry = m_ui->view->currentMatch().first;
|
||||||
reject();
|
if (entry) {
|
||||||
|
clipboard()->setText(entry->resolvePlaceholder(entry->username()));
|
||||||
|
reject();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
connect(copyPasswordAction, &QAction::triggered, this, [&] {
|
connect(copyPasswordAction, &QAction::triggered, this, [&] {
|
||||||
clipboard()->setText(m_ui->view->currentMatch().first->password());
|
auto entry = m_ui->view->currentMatch().first;
|
||||||
reject();
|
if (entry) {
|
||||||
|
clipboard()->setText(entry->resolvePlaceholder(entry->password()));
|
||||||
|
reject();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
connect(copyTotpAction, &QAction::triggered, this, [&] {
|
connect(copyTotpAction, &QAction::triggered, this, [&] {
|
||||||
clipboard()->setText(m_ui->view->currentMatch().first->totp());
|
auto entry = m_ui->view->currentMatch().first;
|
||||||
reject();
|
if (entry) {
|
||||||
|
clipboard()->setText(entry->totp());
|
||||||
|
reject();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user