summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2013-03-17 11:51:34 +0100
committerAndrea Diamantini <adjam7@gmail.com>2013-03-17 11:51:34 +0100
commitf0c13f354071e0b3f5d2982be2fb4d9f040eeaf4 (patch)
treeaa808e73e56aca5e78d1685ed4c56cc775ddfde9
parentSupport "open in webapp" && "install webapp" links (diff)
downloadrekonq-f0c13f354071e0b3f5d2982be2fb4d9f040eeaf4.tar.xz
Fix search from urlbar engine icons click
BUG: 316844
-rw-r--r--src/urlbar/listitem.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/urlbar/listitem.cpp b/src/urlbar/listitem.cpp
index b3f48c41..580eea53 100644
--- a/src/urlbar/listitem.cpp
+++ b/src/urlbar/listitem.cpp
@@ -229,7 +229,6 @@ static QString highlightWordsInText(const QString &text, const QStringList &word
}
}
-
if (boldSections.isEmpty())
return ret;
@@ -463,7 +462,10 @@ void SearchListItem::changeSearchEngine(KService::Ptr engine)
// remove the xx: part...
QString separator = SearchEngine::delimiter();
- QString text = m_text.section(separator, 1, 1);
+
+ QString text = m_text.contains(separator)
+ ? m_text.section(separator, 1, 1)
+ : m_text;
// create a new item && load it...
UrlSuggestionItem item = UrlSuggestionItem(UrlSuggestionItem::Search, SearchEngine::buildQuery(engine, text), text);