From 38e28a52c042d1d2350e1e6b46b6fddf9851e452 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 9 Jan 2012 18:44:47 +0100 Subject: Fix issue with new ordering algorithm Let search item being first when it really is important CCBUG:290884 --- src/urlbar/urlresolver.cpp | 11 ++++++++--- src/urlbar/urlresolver.h | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src') 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 +* Copyright (C) 2009-2012 by Andrea Diamantini * * * 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 +* Copyright (C) 2009-2012 by Andrea Diamantini * * * This program is free software; you can redistribute it and/or -- cgit v1.2.1