diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2012-08-14 01:05:54 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2012-08-14 01:05:54 +0200 |
commit | 9383d2e46171ac4cb81ecda139fa0571efaededf (patch) | |
tree | e50b29156fb1552024f51fae18b483337f62f5db | |
parent | BookmarkWidget: (diff) | |
download | rekonq-9383d2e46171ac4cb81ecda139fa0571efaededf.tar.xz |
Get sure web shortcuts are considered first url detection
BUG: 304994
-rw-r--r-- | src/urlbar/urlresolver.cpp | 5 | ||||
-rw-r--r-- | src/urlbar/urlresolver.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/urlbar/urlresolver.cpp b/src/urlbar/urlresolver.cpp index 43670a14..c6d0f7a4 100644 --- a/src/urlbar/urlresolver.cpp +++ b/src/urlbar/urlresolver.cpp @@ -63,6 +63,7 @@ UrlResolver::UrlResolver(const QString &typedUrl) : QObject() , _typedString(typedUrl.trimmed()) , _typedQuery() + , _isKDEUrl(false) { if (!_searchEngine) setSearchEngine(SearchEngine::defaultEngine()); @@ -175,7 +176,8 @@ UrlSearchList UrlResolver::orderLists() // Browse & Search results UrlSearchList browseSearch; QString lowerTypedString = _typedString.toLower(); - if (_browseRegexp.indexIn(lowerTypedString) != -1) + if (!_isKDEUrl + && (_browseRegexp.indexIn(lowerTypedString) != -1)) { webSearchFirst = true; browseSearch << _webSearches; @@ -291,6 +293,7 @@ void UrlResolver::computeWebSearches() { query = query.remove(0, _typedString.indexOf(SearchEngine::delimiter()) + 1); setSearchEngine(engine); + _isKDEUrl = true; } if (_searchEngine) diff --git a/src/urlbar/urlresolver.h b/src/urlbar/urlresolver.h index 97a5e9a4..d799231f 100644 --- a/src/urlbar/urlresolver.h +++ b/src/urlbar/urlresolver.h @@ -170,6 +170,8 @@ private: static QRegExp _searchEnginesRegexp; static KService::Ptr _searchEngine; + + bool _isKDEUrl; }; // ------------------------------------------------------------------------------ |