summaryrefslogtreecommitdiff
path: root/src/urlbar/urlresolver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/urlbar/urlresolver.cpp')
-rw-r--r--src/urlbar/urlresolver.cpp10
1 files changed, 4 insertions, 6 deletions
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; i<list->count(); 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;