summaryrefslogtreecommitdiff
path: root/src/urlbar/listitem.cpp
diff options
context:
space:
mode:
authormegabigbug <megabigbug@arrakis.(none)>2010-04-16 22:14:38 +0200
committermegabigbug <megabigbug@arrakis.(none)>2010-04-16 22:14:38 +0200
commit3f43542ea6857760d1da6b78ebc152ca4bfc286b (patch)
tree82913c20df01d6e4fd8dfe66ceccef626372b79b /src/urlbar/listitem.cpp
parentFixing Lionel's merge request: (diff)
downloadrekonq-3f43542ea6857760d1da6b78ebc152ca4bfc286b.tar.xz
fix text pointed in the search item
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>");
}