diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2012-01-09 18:44:47 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2012-01-09 18:44:47 +0100 |
commit | 38e28a52c042d1d2350e1e6b46b6fddf9851e452 (patch) | |
tree | d0d635966fd7b59364766b9717c86e6202ba9e56 /src | |
parent | Merge branch 'master' of git://anongit.kde.org/rekonq (diff) | |
download | rekonq-38e28a52c042d1d2350e1e6b46b6fddf9851e452.tar.xz |
Fix issue with new ordering algorithm
Let search item being first when it really is important
CCBUG:290884
Diffstat (limited to 'src')
-rw-r--r-- | src/urlbar/urlresolver.cpp | 11 | ||||
-rw-r--r-- | src/urlbar/urlresolver.h | 2 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/urlbar/urlresolver.cpp b/src/urlbar/urlresolver.cpp index 18c74661..5bf2ee6a 100644 --- a/src/urlbar/urlresolver.cpp +++ b/src/urlbar/urlresolver.cpp @@ -2,7 +2,7 @@ * * This file is a part of the rekonq project * -* Copyright (C) 2009-2011 by Andrea Diamantini <adjam7 at gmail dot com> +* Copyright (C) 2009-2012 by Andrea Diamantini <adjam7 at gmail dot com> * * * This program is free software; you can redistribute it and/or @@ -158,11 +158,12 @@ UrlSearchList UrlResolver::orderLists() // You have to add here the "browse & search" options, always available. const int availableEntries = 8; + bool webSearchFirst = false; // Browse & Search results UrlSearchList browseSearch; if (_browseRegexp.indexIn(_typedString) != -1) { - browseSearch << _qurlFromUserInput; + webSearchFirst = true; browseSearch << _webSearches; } else @@ -232,7 +233,11 @@ UrlSearchList UrlResolver::orderLists() } // and finally, results - UrlSearchList list = relevant + browseSearch + _history + _bookmarks; + UrlSearchList list; + + if (webSearchFirst) + list << _qurlFromUserInput; + list += relevant + browseSearch + _history + _bookmarks; return list; } diff --git a/src/urlbar/urlresolver.h b/src/urlbar/urlresolver.h index d030c607..167ee283 100644 --- a/src/urlbar/urlresolver.h +++ b/src/urlbar/urlresolver.h @@ -2,7 +2,7 @@ * * This file is a part of the rekonq project * -* Copyright (C) 2009-2011 by Andrea Diamantini <adjam7 at gmail dot com> +* Copyright (C) 2009-2012 by Andrea Diamantini <adjam7 at gmail dot com> * * * This program is free software; you can redistribute it and/or |