Skip to content

Commit

Permalink
Merge pull request #2055 from varjolintu/title_match_removal
Browse files Browse the repository at this point in the history
Remove title matching
  • Loading branch information
phoerious authored Jun 18, 2018
2 parents 0ad5981 + fc8e0e7 commit 5df8ddf
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/browser/BrowserService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,14 +375,11 @@ QList<Entry*> BrowserService::searchEntries(Database* db, const QString& hostnam
}

for (Entry* entry : EntrySearcher().search(hostname, rootGroup, Qt::CaseInsensitive)) {
QString title = entry->title();
QString url = entry->url();

// Filter to match hostname in Title and Url fields
if ((!title.isEmpty() && hostname.contains(title))
|| (!url.isEmpty() && hostname.contains(url))
|| (matchUrlScheme(title) && hostname.endsWith(QUrl(title).host()))
|| (matchUrlScheme(url) && hostname.endsWith(QUrl(url).host())) ) {
// Filter to match hostname in URL field
if ((!url.isEmpty() && hostname.contains(url))
|| (matchUrlScheme(url) && hostname.endsWith(QUrl(url).host()))) {
entries.append(entry);
}
}
Expand Down

0 comments on commit 5df8ddf

Please sign in to comment.