diff options
Diffstat (limited to 'src/urlbar/urlsuggester.cpp')
-rw-r--r-- | src/urlbar/urlsuggester.cpp | 65 |
1 files changed, 2 insertions, 63 deletions
diff --git a/src/urlbar/urlsuggester.cpp b/src/urlbar/urlsuggester.cpp index 897b1eb0..aed50c22 100644 --- a/src/urlbar/urlsuggester.cpp +++ b/src/urlbar/urlsuggester.cpp @@ -125,7 +125,8 @@ UrlSuggester::UrlSuggester(const QString &typedUrl) } -UrlSuggestionList UrlSuggester::orderedSearchItems() +// UrlSuggestionList UrlSuggester::orderedSearchItems() +UrlSuggestionList UrlSuggester::computeSuggestions() { if (_typedString.startsWith(QL1S("rekonq:"))) { @@ -363,68 +364,6 @@ void UrlSuggester::computeBookmarks() } -// opensearch suggestion -void UrlSuggester::computeSuggestions() -{ - // NOTE - // This attempt basically cuts out open search suggestions. - UrlSuggestionList 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()) -// { -// UrlSuggestionList 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(QString,ResponseList)), -// this, -// SLOT(suggestionsReceived(QString,ResponseList))); -// -// _typedQuery = query; -// rApp->opensearchManager()->requestSuggestion(query); -} - - -// void UrlSuggester::suggestionsReceived(const QString &text, const ResponseList &suggestions) -// { -// if (text != _typedString) -// return; -// -// UrlSuggestionList sugList; -// QString urlString; -// Q_FOREACH(const Response & i, suggestions) -// { -// if (text == i.title) -// continue; -// -// urlString = i.url; -// if (urlString.isEmpty()) -// { -// urlString = SearchEngine::buildQuery(UrlSuggester::searchEngine(), i.title); -// } -// -// UrlSuggestionItem gItem(UrlSuggestionItem::Suggestion, urlString, i.title, i.description, i.image, i.image_width, i.image_height); -// sugList << gItem; -// } -// emit suggestionsReady(sugList, _typedString); -// this->deleteLater(); -// } - - ////////////////////////////////////////////////////////////////////////// |