From 16fad1aba155573cd417caace672ffb286800c8c Mon Sep 17 00:00:00 2001 From: thez3ro Date: Wed, 31 Jan 2018 21:53:53 +0100 Subject: [PATCH] fix duplicate autotype sequences --- src/autotype/AutoType.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/autotype/AutoType.cpp b/src/autotype/AutoType.cpp index 73bb3ef4..0dfdedae 100644 --- a/src/autotype/AutoType.cpp +++ b/src/autotype/AutoType.cpp @@ -285,10 +285,10 @@ void AutoType::performGlobalAutoType(const QList& dbList) for (Database* db : dbList) { const QList dbEntries = db->rootGroup()->entriesRecursive(); for (Entry* entry : dbEntries) { - const QList sequences = autoTypeSequences(entry, windowTitle); + const QSet sequences = autoTypeSequences(entry, windowTitle).toSet(); for (const QString& sequence : sequences) { if (!sequence.isEmpty()) { - matchList << AutoTypeMatch(entry,sequence); + matchList << AutoTypeMatch(entry, sequence); } } } @@ -531,6 +531,7 @@ QList AutoType::createActionFromTemplate(const QString& tmpl, c /** * Retrive the autotype sequences matches for a given windowTitle + * This returns a list with priority ordering. If you don't want duplicates call .toSet() on it. */ QList AutoType::autoTypeSequences(const Entry* entry, const QString& windowTitle) {