summaryrefslogtreecommitdiff
path: root/src/urlbar/listitem.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-04-17 15:54:14 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-04-17 15:54:14 +0200
commit3739aa111b231cab0dacfa8ce4a2268f2a4a8a1a (patch)
tree9e7b02769401dc03e25198161f2478a62c133db7 /src/urlbar/listitem.cpp
parentMerge commit 'refs/merge-requests/79' of git://gitorious.org/rekonq/mainline ... (diff)
parentfix text pointed in the search item (diff)
downloadrekonq-3739aa111b231cab0dacfa8ce4a2268f2a4a8a1a.tar.xz
Merge commit 'refs/merge-requests/81' of git://gitorious.org/rekonq/mainline into m81
Diffstat (limited to 'src/urlbar/listitem.cpp')
-rw-r--r--src/urlbar/listitem.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/urlbar/listitem.cpp b/src/urlbar/listitem.cpp
index 7d1d39b2..6f91aabd 100644
--- a/src/urlbar/listitem.cpp
+++ b/src/urlbar/listitem.cpp
@@ -199,7 +199,9 @@ ItemText::ItemText(const QString &text, const QString &textToPointOut, QWidget *
: QLabel(parent)
{
QString t = text;
- t = t.replace(QRegExp("(" + textToPointOut + ")", Qt::CaseInsensitive), "<b>\\1</b>");
+ if (!textToPointOut.isEmpty())
+ t = t.replace(QRegExp("(" + textToPointOut + ")", Qt::CaseInsensitive), "<b>\\1</b>");
+
setText(t);
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum);
}
@@ -279,7 +281,7 @@ SearchListItem::SearchListItem(const UrlSearchItem &item, const QString &text, Q
if (m_currentEngine == "") m_currentEngine = EngineBar::defaultEngine();
m_iconLabel = new ItemIcon("edit-find", this); //TODO: get the default engine icon
- m_titleLabel = new ItemText(searchItemTitle(m_currentEngine, text), text);
+ m_titleLabel = new ItemText(searchItemTitle(m_currentEngine, text));
m_engineBar = new EngineBar(text, m_currentEngine, this);
// without this it will not work :)
@@ -297,7 +299,7 @@ SearchListItem::SearchListItem(const UrlSearchItem &item, const QString &text, Q
QString SearchListItem::searchItemTitle(QString engine, QString text)
{
- return QString("Search "+ engine +" for <u>"+text+"</u>");
+ return QString("Search "+ engine +" for <b>"+text+"</b>");
}