diff options
author | Yoann Laissus <yoann.laissus@gmail.com> | 2012-02-09 18:40:21 +0100 |
---|---|---|
committer | Yoann Laissus <yoann.laissus@gmail.com> | 2012-02-09 18:40:21 +0100 |
commit | f5c45173623e39fb5ad67ae870c4bdfe5fe8520c (patch) | |
tree | 79e1703c95cf40c3d426f1ff1980bc50d6778028 /src/urlbar/listitem.cpp | |
parent | Fix right icon duplication in the UrlBar on some website (diff) | |
parent | Clean up sessionmanager mess :) (diff) | |
download | rekonq-f5c45173623e39fb5ad67ae870c4bdfe5fe8520c.tar.xz |
Merge branch 'master' of git://anongit.kde.org/rekonq
Diffstat (limited to 'src/urlbar/listitem.cpp')
-rw-r--r-- | src/urlbar/listitem.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/urlbar/listitem.cpp b/src/urlbar/listitem.cpp index d285e395..d3e95ef3 100644 --- a/src/urlbar/listitem.cpp +++ b/src/urlbar/listitem.cpp @@ -2,7 +2,7 @@ * * This file is a part of the rekonq project * -* Copyright (C) 2009-2011 by Andrea Diamantini <adjam7 at gmail dot com> +* Copyright (C) 2009-2012 by Andrea Diamantini <adjam7 at gmail dot com> * * * This program is free software; you can redistribute it and/or @@ -309,7 +309,7 @@ DescriptionLabel::DescriptionLabel(const QString &text, QWidget *parent) if (wasItalic) t = QL1S("<i>") + t + QL1S("</i>"); - setWordWrap(false); //TODO: why setWordWrap(true) make items have a strange behavior ? + setWordWrap(false); //NOTE: why setWordWrap(true) make items have a strange behavior ? setText(t); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum); } @@ -451,8 +451,11 @@ QString SearchListItem::text() void SearchListItem::changeSearchEngine(KService::Ptr engine) { - UrlResolver::setSearchEngine(engine); - emit updateList(); + // NOTE: This to let rekonq loading text typed in the requested engine on click. + // There probably is a better way to do it. I just cannot see it now... + UrlSearchItem item = UrlSearchItem(UrlSearchItem::Search, SearchEngine::buildQuery(engine, m_text), m_text); + SearchListItem sItem(item, m_text, this); + emit itemClicked(&sItem, Qt::LeftButton, Qt::NoModifier); } |