summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);