Allow hiding expired entries from Auto-Type

* Add setting to hide expired entries from Auto-Type
* Expired entries will not be shown in selection dialogs or be auto-picked for use
* Fixes #1855
This commit is contained in:
Bernhard
2020-08-29 08:44:50 -04:00
committed by Jonathan White
parent 5c2a1a4284
commit 745f1befe9
5 changed files with 15 additions and 0 deletions

View File

@@ -337,10 +337,14 @@ void AutoType::performGlobalAutoType(const QList<QSharedPointer<Database>>& dbLi
}
QList<AutoTypeMatch> matchList;
bool hideExpired = config()->get(Config::AutoTypeHideExpiredEntry).toBool();
for (const auto& db : dbList) {
const QList<Entry*> dbEntries = db->rootGroup()->entriesRecursive();
for (Entry* entry : dbEntries) {
if (hideExpired && entry->isExpired()) {
continue;
}
const QSet<QString> sequences = autoTypeSequences(entry, m_windowTitleForGlobal).toSet();
for (const QString& sequence : sequences) {
if (!sequence.isEmpty()) {