diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2012-08-03 01:26:03 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2012-12-10 02:48:04 +0100 |
commit | 91c709932f8d49323f2834dcfb501fade27a8f6e (patch) | |
tree | 028467de1682a3748607e2b2a037456c2f6c7917 /src/urlbar/listitem.cpp | |
parent | Removed (FOR NOW) open search feature (diff) | |
download | rekonq-91c709932f8d49323f2834dcfb501fade27a8f6e.tar.xz |
Clean up url suggestions loading
Diffstat (limited to 'src/urlbar/listitem.cpp')
-rw-r--r-- | src/urlbar/listitem.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/urlbar/listitem.cpp b/src/urlbar/listitem.cpp index b47d23bf..86bd9101 100644 --- a/src/urlbar/listitem.cpp +++ b/src/urlbar/listitem.cpp @@ -425,11 +425,15 @@ SearchListItem::SearchListItem(const UrlSuggestionItem &item, const QString &tex : ListItem(item, parent) , m_text(text) { - // FIXME -// m_iconLabel = new IconLabel(SearchEngine::buildQuery(UrlResolver::searchEngine(), ""), this); -// m_titleLabel = new TextLabel(this); -// m_titleLabel->setEngineText(UrlResolver::searchEngine()->name(), item.title); -// m_engineBar = new EngineBar(UrlResolver::searchEngine(), parent); + m_iconLabel = new IconLabel(item.url, this); + m_titleLabel = new TextLabel(this); + m_titleLabel->setEngineText(item.description, item.title); + + KService::Ptr engine = SearchEngine::fromString(text); + if (!engine) + engine = SearchEngine::defaultEngine(); + + m_engineBar = new EngineBar(engine, parent); QHBoxLayout *hLayout = new QHBoxLayout; hLayout->setSpacing(4); @@ -482,6 +486,7 @@ EngineBar::EngineBar(KService::Ptr selectedEngine, QWidget *parent) if (SearchEngine::defaultEngine().isNull()) return; + m_engineGroup->addAction(newEngineAction(SearchEngine::defaultEngine(), selectedEngine)); Q_FOREACH(const KService::Ptr & engine, SearchEngine::favorites()) { |