From 7591fc715c51006ff3d0dc88b24c34c179c5b246 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 24 Feb 2016 11:18:58 +0100 Subject: [PATCH] Git: Remove unneeded painter state save/restore The QPainter::drawPixmap call does not modify the painter state. Change-Id: I1cbae43e6531c9e3d2ae2d3cd1c2d77ce23c4c52 Reviewed-by: Orgad Shaneh --- src/plugins/git/logchangedialog.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/plugins/git/logchangedialog.cpp b/src/plugins/git/logchangedialog.cpp index fd0212cce0..24541cfe98 100644 --- a/src/plugins/git/logchangedialog.cpp +++ b/src/plugins/git/logchangedialog.cpp @@ -291,9 +291,7 @@ void IconItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti QStyleOptionViewItem o = option; if (index.column() == 0 && hasIcon(index.row())) { const QSize size = option.decorationSize; - painter->save(); painter->drawPixmap(o.rect.x(), o.rect.y(), m_icon.pixmap(size.width(), size.height())); - painter->restore(); o.rect.setLeft(size.width()); } QStyledItemDelegate::paint(painter, o, index); -- GitLab