From c20433d2e4cbaf67efffc2d6a69a58a4db2ab23c Mon Sep 17 00:00:00 2001 From: megabigbug Date: Tue, 8 Jun 2010 20:52:09 +0200 Subject: more contraints for privileged item selection --- src/urlbar/urlresolver.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/urlbar') diff --git a/src/urlbar/urlresolver.cpp b/src/urlbar/urlresolver.cpp index e4e2cd78..1f4f9f9c 100644 --- a/src/urlbar/urlresolver.cpp +++ b/src/urlbar/urlresolver.cpp @@ -316,18 +316,16 @@ UrlSearchList UrlResolver::bookmarksResolution() UrlSearchItem UrlResolver::privilegedItem(UrlSearchList* list) { UrlSearchItem item; - QString dot; - if(!_typedString.endsWith(QL1C('.'))) - { - dot = QString(QL1C('.')); - } + QString dot = QString(QL1C('.')); + QString test1 = QString(QL1C('/')) + _typedString + dot; + QString test2 = dot + _typedString + dot; for(int i = 0; icount(); i++) { item = list->at(i); //kDebug() << item.url.host(); //TODO: move this to AwesomeUrlCompletion::substringCompletion and add a priviledged flag to UrlSearchItem - if (item.url.contains(_typedString + dot)) + if (item.url.contains(test1) || item.url.contains(test2)) { list->removeAt(i); return item; -- cgit v1.2.1