summaryrefslogtreecommitdiff
path: root/src/urlbar
diff options
context:
space:
mode:
authorlionelc <lionelc@lionelc.(none)>2010-03-30 11:01:44 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-04-02 22:00:48 +0200
commit45acb07245d52a51e5b486eaab3c4fdddc2ccbad (patch)
tree3d73da7c160915f6d1b8bd1dcaa74823b70a849e /src/urlbar
parentmore gentle autoscroll.. (diff)
downloadrekonq-45acb07245d52a51e5b486eaab3c4fdddc2ccbad.tar.xz
display bookmark and history item only if string typed is longer than 3 chars
Diffstat (limited to 'src/urlbar')
-rw-r--r--src/urlbar/urlresolver.cpp33
1 files changed, 18 insertions, 15 deletions
diff --git a/src/urlbar/urlresolver.cpp b/src/urlbar/urlresolver.cpp
index cb61ad95..5593f566 100644
--- a/src/urlbar/urlresolver.cpp
+++ b/src/urlbar/urlresolver.cpp
@@ -81,23 +81,26 @@ UrlSearchList UrlResolver::orderedSearchItems()
list << qurlFromUserInputResolution();
}
- int firstResults = list.count();
- int checkPoint = 9 - firstResults;
-
- UrlSearchList historyList = historyResolution();
- int historyResults = historyList.count();
-
- UrlSearchList bookmarksList = bookmarksResolution();
- int bookmarkResults = bookmarksList.count();
-
- if(historyResults + bookmarkResults > checkPoint)
+ if (_urlString.length()>2)
{
- historyList = historyList.mid(0,3);
- bookmarksList = bookmarksList.mid(0,3);
+ int firstResults = list.count();
+ int checkPoint = 9 - firstResults;
+
+ UrlSearchList historyList = historyResolution();
+ int historyResults = historyList.count();
+
+ UrlSearchList bookmarksList = bookmarksResolution();
+ int bookmarkResults = bookmarksList.count();
+
+ if(historyResults + bookmarkResults > checkPoint)
+ {
+ historyList = historyList.mid(0,3);
+ bookmarksList = bookmarksList.mid(0,3);
+ }
+ list << historyList;
+ list << bookmarksList;
}
- list << historyList;
- list << bookmarksList;
-
+
return list;
}