diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-05-21 00:33:31 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-05-24 17:21:48 +0200 |
commit | 62d1f4f116e8720eff78c384c39e4e84e8a26feb (patch) | |
tree | a80062a08c8be6d21b11ebcf0616cf33a4a06738 /src | |
parent | remove domainNameItem() method (diff) | |
download | rekonq-62d1f4f116e8720eff78c384c39e4e84e8a26feb.tar.xz |
This commit fixes my problems with this new handling.
It searches before in the history, to ensure search is done in the
widest site list && change a bit the search mechanism
Diffstat (limited to 'src')
-rw-r--r-- | src/urlbar/urlresolver.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/urlbar/urlresolver.cpp b/src/urlbar/urlresolver.cpp index af176a98..c2f1d0ee 100644 --- a/src/urlbar/urlresolver.cpp +++ b/src/urlbar/urlresolver.cpp @@ -140,14 +140,14 @@ UrlSearchList UrlResolver::orderedSearchItems() int firstResults = list.count(); int checkPoint = 9 - firstResults; - UrlSearchList bookmarksList = bookmarksResolution(); - UrlSearchItem privileged = privilegedItem(&bookmarksList); - int bookmarkResults = bookmarksList.count(); - UrlSearchList historyList = historyResolution(); + UrlSearchItem privileged = privilegedItem(&historyList); + int historyResults = historyList.count(); + + UrlSearchList bookmarksList = bookmarksResolution(); if (privileged.type == UrlSearchItem::Undefined) { - privileged = privilegedItem(&historyList); + privileged = privilegedItem(&bookmarksList); } if (privileged.type != UrlSearchItem::Undefined) @@ -155,9 +155,9 @@ UrlSearchList UrlResolver::orderedSearchItems() list.insert(0,privileged); } - int historyResults = historyList.count(); + int bookmarksResults = bookmarksList.count(); - if (historyResults + bookmarkResults > checkPoint) + if (historyResults + bookmarksResults > checkPoint) { historyList = historyList.mid(0, 3); bookmarksList = bookmarksList.mid(0, 3); @@ -261,7 +261,8 @@ UrlSearchItem UrlResolver::privilegedItem(UrlSearchList* list) while(i<list->count()) { UrlSearchItem item = list->at(i); - if (item.url.url().contains("."+_typedString+".") || item.url.url().contains("/"+_typedString+".")) + kDebug() << item.url.host(); + if (item.url.host().contains( _typedString + QL1C('.') ) ) { list->removeAt(i); return item; |