diff options
author | megabigbug <megabigbug@arrakis.(none)> | 2010-06-08 20:52:09 +0200 |
---|---|---|
committer | megabigbug <megabigbug@arrakis.(none)> | 2010-06-08 20:52:09 +0200 |
commit | c20433d2e4cbaf67efffc2d6a69a58a4db2ab23c (patch) | |
tree | bbc26442376ff317ce4db2d4cb20f7ba10e3d83a | |
parent | Merge commit 'refs/merge-requests/133' of git://gitorious.org/rekonq/mainline... (diff) | |
download | rekonq-c20433d2e4cbaf67efffc2d6a69a58a4db2ab23c.tar.xz |
more contraints for privileged item selection
-rw-r--r-- | src/urlbar/urlresolver.cpp | 10 |
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; |