From 0cf48359f97cc921818c4d4ac7fb86d110e4acf0 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Sat, 27 Jan 2018 13:32:26 +0100 Subject: [PATCH] LocationCompleterDelegate: Draw search engine icon for search shortcuts --- src/lib/navigation/completer/locationcompleterdelegate.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/navigation/completer/locationcompleterdelegate.cpp b/src/lib/navigation/completer/locationcompleterdelegate.cpp index 53be4e4b2..44b636b51 100644 --- a/src/lib/navigation/completer/locationcompleterdelegate.cpp +++ b/src/lib/navigation/completer/locationcompleterdelegate.cpp @@ -95,6 +95,10 @@ void LocationCompleterDelegate::paint(QPainter* painter, const QStyleOptionViewI } if (loadAction.type == LocationBar::LoadAction::Bookmark) { pixmap = IconProvider::instance()->bookmarkIcon().pixmap(iconSize, iconMode); + } else if (loadAction.type == LocationBar::LoadAction::Search) { + if (loadAction.searchEngine.name != LocationBar::searchEngine().name) { + pixmap = loadAction.searchEngine.icon.pixmap(iconSize, iconMode); + } } painter->drawPixmap(iconRect, pixmap); leftPosition = iconRect.right() + m_padding * 2;