diff options
author | megabigbug <megabigbug@yahoo.fr> | 2010-10-04 08:32:21 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-10-30 11:38:06 +0200 |
commit | 72af78494652e97cf2caaf05a4ac1613359400f6 (patch) | |
tree | a3968f159fd075a10c20ad2165ecef66b14b9eef /src/urlbar/urlresolver.cpp | |
parent | Added CtestConfig.cmake (diff) | |
download | rekonq-72af78494652e97cf2caaf05a4ac1613359400f6.tar.xz |
add an xml parser to the opensearch engine.
Diffstat (limited to 'src/urlbar/urlresolver.cpp')
-rw-r--r-- | src/urlbar/urlresolver.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/urlbar/urlresolver.cpp b/src/urlbar/urlresolver.cpp index 71d6e69c..a7c63969 100644 --- a/src/urlbar/urlresolver.cpp +++ b/src/urlbar/urlresolver.cpp @@ -29,11 +29,9 @@ #include "urlresolver.moc" // Local Includes -#include "application.h" #include "historymanager.h" #include "bookmarkprovider.h" #include "searchengine.h" -#include "opensearchmanager.h" // KDE Includes #include <KBookmark> @@ -72,7 +70,7 @@ UrlResolver::UrlResolver(const QString &typedUrl) : QObject() , _typedString(typedUrl.trimmed()) { - if (!_searchEngine ) _searchEngine = SearchEngine::defaultEngine(); + if (!_searchEngine ) setSearchEngine(SearchEngine::defaultEngine()); if ( _browseRegexp.isEmpty() ) { @@ -392,25 +390,29 @@ void UrlResolver::computeSuggestions() if (Application::opensearchManager()->isSuggestionAvailable()) { connect(Application::opensearchManager(), - SIGNAL(suggestionReceived(const QString &, const QStringList &)), + SIGNAL(suggestionReceived(const QString &, const ResponseList &)), this, - SLOT(suggestionsReceived(const QString &, const QStringList &))); + SLOT(suggestionsReceived(const QString &, const ResponseList &))); Application::opensearchManager()->requestSuggestion(_typedString); } } -void UrlResolver::suggestionsReceived(const QString &text, const QStringList &suggestions) +void UrlResolver::suggestionsReceived(const QString &text, const ResponseList &suggestions) { if(text != _typedString) return; UrlSearchList sugList; - Q_FOREACH(const QString &s, suggestions) + Q_FOREACH(const Response &i, suggestions) { +<<<<<<< HEAD UrlSearchItem gItem(UrlSearchItem::Suggestion, SearchEngine::buildQuery(UrlResolver::searchEngine(), s), s); +======= + UrlSearchItem gItem(UrlSearchItem::Suggestion, i.title, i.title); +>>>>>>> add an xml parser to the opensearch engine. sugList << gItem; } emit suggestionsReady(sugList, _typedString); |