diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2011-12-31 10:29:27 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2012-01-03 18:49:01 +0100 |
commit | 8528c9b7e7ec20af225497442cfc58631ba91e30 (patch) | |
tree | ca26eeb5a6f2142294bc6f08c56b19fbd86f16f5 /src/urlbar/urlresolver.cpp | |
parent | Invert PreviewListItem order: icon, text, preview. (diff) | |
download | rekonq-8528c9b7e7ec20af225497442cfc58631ba91e30.tar.xz |
cut out open search suggestions
Diffstat (limited to 'src/urlbar/urlresolver.cpp')
-rw-r--r-- | src/urlbar/urlresolver.cpp | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/src/urlbar/urlresolver.cpp b/src/urlbar/urlresolver.cpp index 20f2107d..1da3e78f 100644 --- a/src/urlbar/urlresolver.cpp +++ b/src/urlbar/urlresolver.cpp @@ -370,30 +370,36 @@ void UrlResolver::computeBookmarks() // opensearch suggestion void UrlResolver::computeSuggestions() { - // if a string startsWith /, it is probably a local path - // so, no need for suggestions... - if (_typedString.startsWith('/') || !rApp->opensearchManager()->isSuggestionAvailable()) - { - UrlSearchList list; - emit suggestionsReady(list, _typedString); - return; - } - - QString query = _typedString; - KService::Ptr engine = SearchEngine::fromString(_typedString); - if (engine) - { - query = query.remove(0, _typedString.indexOf(SearchEngine::delimiter()) + 1); - setSearchEngine(engine); - } - - connect(rApp->opensearchManager(), - SIGNAL(suggestionsReceived(const QString &, const ResponseList &)), - this, - SLOT(suggestionsReceived(const QString &, const ResponseList &))); - - _typedQuery = query; - rApp->opensearchManager()->requestSuggestion(query); + // NOTE + // This attempt basically cuts out open search suggestions. + UrlSearchList list; + emit suggestionsReady(list, _typedString); + return; + +// // if a string startsWith /, it is probably a local path +// // so, no need for suggestions... +// if (_typedString.startsWith('/') || !rApp->opensearchManager()->isSuggestionAvailable()) +// { +// UrlSearchList list; +// emit suggestionsReady(list, _typedString); +// return; +// } +// +// QString query = _typedString; +// KService::Ptr engine = SearchEngine::fromString(_typedString); +// if (engine) +// { +// query = query.remove(0, _typedString.indexOf(SearchEngine::delimiter()) + 1); +// setSearchEngine(engine); +// } +// +// connect(rApp->opensearchManager(), +// SIGNAL(suggestionsReceived(const QString &, const ResponseList &)), +// this, +// SLOT(suggestionsReceived(const QString &, const ResponseList &))); +// +// _typedQuery = query; +// rApp->opensearchManager()->requestSuggestion(query); } |