summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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);
}