mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-12-05 00:02:33 -08:00
Add setting for search results timeout (#3411)
* Fix #3400 * Allow enabling/disabling search timeout * Allow setting search timeout in minutes
This commit is contained in:
1 parent
6ae27fa47b
commit
726dbc004d
4 files changed
+60
-10
No files matched your search
@@ -116,8 +116,13 @@ bool SearchWidget::eventFilter(QObject* obj, QEvent* event)
|
||||
}
|
||||
}
|
||||
} else if (event->type() == QEvent::FocusOut) {
|
||||
// Auto-clear search after 5 minutes
|
||||
m_clearSearchTimer->start(300000);
|
||||
if (config()->get("security/clearsearch").toBool()) {
|
||||
int timeout = config()->get("security/clearsearchtimeout").toInt();
|
||||
if (timeout > 0) {
|
||||
// Auto-clear search after set timeout (5 minutes by default)
|
||||
m_clearSearchTimer->start(timeout * 60000); // 60 sec * 1000 ms
|
||||
}
|
||||
}
|
||||
} else if (event->type() == QEvent::FocusIn) {
|
||||
m_clearSearchTimer->stop();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user