diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2013-03-17 11:51:34 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2013-03-17 11:51:34 +0100 |
commit | f0c13f354071e0b3f5d2982be2fb4d9f040eeaf4 (patch) | |
tree | aa808e73e56aca5e78d1685ed4c56cc775ddfde9 /src | |
parent | Support "open in webapp" && "install webapp" links (diff) | |
download | rekonq-f0c13f354071e0b3f5d2982be2fb4d9f040eeaf4.tar.xz |
Fix search from urlbar engine icons click
BUG: 316844
Diffstat (limited to 'src')
-rw-r--r-- | src/urlbar/listitem.cpp | 6 |
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); |