From 0d5c86f8cdf403f643d7ce50f846da4ba2b75b42 Mon Sep 17 00:00:00 2001 From: nowrep Date: Thu, 5 Dec 2013 19:48:24 +0100 Subject: [PATCH] [UrlCompleter] Don't show same urls multiple times Closes #1096 --- CHANGELOG | 1 + src/lib/navigation/completer/locationcompletermodel.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 56b6de0ee..b017cc85c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -29,6 +29,7 @@ Version 1.5.0 * fixed: displaying a lot of RSS feeds in RSS widget in locationbar * fixed: enabling disabled rules in AdBlock now works everytime * fixed: parsing OpenSearch files with XML declaration + * fixed: don't show urls multiple times in url completer Version 1.4.4 * released 1 September 2013 diff --git a/src/lib/navigation/completer/locationcompletermodel.cpp b/src/lib/navigation/completer/locationcompletermodel.cpp index 9604b087e..b5d74995a 100644 --- a/src/lib/navigation/completer/locationcompletermodel.cpp +++ b/src/lib/navigation/completer/locationcompletermodel.cpp @@ -213,6 +213,8 @@ QSqlQuery LocationCompleterModel::createQuery(const QString &searchString, const query.append(QString("AND (NOT %1.url=?) ").arg(table)); } + query.append(QString("GROUP BY %1.url ").arg(table)); + if (!orderBy.isEmpty()) { query.append("ORDER BY " + orderBy); }