mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-12-06 08:42:36 -08:00
Allow copying passwords directly from searching
* Reverts removal of previously implemented feature * Fix #2630 * Make gui search tests more robust
This commit is contained in:
1 parent
88c8cdd800
commit
71e375aff0
2 files changed
+25
-7
No files matched your search
@@ -1,5 +1,4 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Jonathan White <[email protected]>
|
||||
* Copyright (C) 2017 KeePassXC Team <[email protected]>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -97,6 +96,13 @@ bool SearchWidget::eventFilter(QObject* obj, QEvent* event)
|
||||
if (keyEvent->key() == Qt::Key_Escape) {
|
||||
emit escapePressed();
|
||||
return true;
|
||||
} else if (keyEvent->matches(QKeySequence::Copy)) {
|
||||
// If Control+C is pressed in the search edit when no text
|
||||
// is selected, copy the password of the current entry.
|
||||
if (!m_ui->searchEdit->hasSelectedText()) {
|
||||
emit copyPressed();
|
||||
return true;
|
||||
}
|
||||
} else if (keyEvent->matches(QKeySequence::MoveToNextLine)) {
|
||||
if (m_ui->searchEdit->cursorPosition() == m_ui->searchEdit->text().length()) {
|
||||
// If down is pressed at EOL, move the focus to the entry view
|
||||
|
||||
Reference in new issue
Block a user