Remove credential sorting from Browser Integration (#6353)

This commit is contained in:
Sami Vänttinen authored and GitHub committed 2021-03-31 23:14:29 -04:00
1 parent 439c155552
commit c19efb5b19
9 files changed
+4 -97

No files matched your search

+2 -7
View File
@@ -750,14 +750,9 @@ BrowserService::sortEntries(QList<Entry*>& pwEntries, const QString& siteUrlStr,
std::sort(keys.begin(), keys.end(), [](int l, int r) { return l > r; });
QList<Entry*> results;
auto sortField = browserSettings()->sortByTitle() ? EntryAttributes::TitleKey : EntryAttributes::UserNameKey;
for (auto key : keys) {
// Sort same priority entries by Title or UserName
auto entries = priorities.values(key);
std::sort(entries.begin(), entries.end(), [&sortField](Entry* left, Entry* right) {
return QString::localeAwareCompare(left->attribute(sortField), right->attribute(sortField)) < 0;
});
results << entries;
results << priorities.values(key);
if (browserSettings()->bestMatchOnly() && !results.isEmpty()) {
// Early out once we find the highest batch of matches
break;