From 8aa687e5b8b33ca02bac132ec36c6cc623313501 Mon Sep 17 00:00:00 2001 From: Flavio Tordini Date: Mon, 2 Nov 2009 21:25:15 +0100 Subject: [PATCH] Removed useless QPalette instance --- src/playlist/PrettyItemDelegate.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/playlist/PrettyItemDelegate.cpp b/src/playlist/PrettyItemDelegate.cpp index 4640417..c916d0d 100644 --- a/src/playlist/PrettyItemDelegate.cpp +++ b/src/playlist/PrettyItemDelegate.cpp @@ -70,8 +70,6 @@ void PrettyItemDelegate::paintBody( QPainter* painter, const QRectF line(0, 0, option.rect.width(), option.rect.height()); painter->setClipRect(line); - QPalette palette; - const bool isActive = index.data( ActiveTrackRole ).toBool(); const bool isSelected = option.state & QStyle::State_Selected; @@ -165,7 +163,7 @@ void PrettyItemDelegate::paintBody( QPainter* painter, */ // separator - painter->setPen(palette.color(QPalette::Midlight)); + painter->setPen(option.palette.color(QPalette::Midlight)); painter->drawLine(0, THUMB_HEIGHT, line.width(), THUMB_HEIGHT); painter->restore(); -- 2.39.5