summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-12-31 10:29:27 +0100
committerAndrea Diamantini <adjam7@gmail.com>2012-01-03 18:49:01 +0100
commit8528c9b7e7ec20af225497442cfc58631ba91e30 (patch)
treeca26eeb5a6f2142294bc6f08c56b19fbd86f16f5
parentInvert PreviewListItem order: icon, text, preview. (diff)
downloadrekonq-8528c9b7e7ec20af225497442cfc58631ba91e30.tar.xz
cut out open search suggestions
-rw-r--r--src/urlbar/completionwidget.cpp3
-rw-r--r--src/urlbar/urlresolver.cpp54
2 files changed, 32 insertions, 25 deletions
diff --git a/src/urlbar/completionwidget.cpp b/src/urlbar/completionwidget.cpp
index 5bb55c92..b349041d 100644
--- a/src/urlbar/completionwidget.cpp
+++ b/src/urlbar/completionwidget.cpp
@@ -384,7 +384,8 @@ void CompletionWidget::suggestUrls(const QString &text)
}
UrlResolver *res = new UrlResolver(text);
- connect(res, SIGNAL(suggestionsReady(const UrlSearchList &, const QString &)), this, SLOT(updateSearchList(const UrlSearchList &, const QString &)));
+ connect(res, SIGNAL(suggestionsReady(const UrlSearchList &, const QString &)),
+ this, SLOT(updateSearchList(const UrlSearchList &, const QString &)));
_resList = res->orderedSearchItems();
// NOTE: It's important to call this AFTER orderedSearchItems() to let everything work
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);
}