Commit cd6da087 authored by Jakob Leben's avatar Jakob Leben

Qt: no need to go from bool to int

parent de18629c
...@@ -83,7 +83,7 @@ void PlListViewItemDelegate::paint( QPainter * painter, const QStyleOptionViewIt ...@@ -83,7 +83,7 @@ void PlListViewItemDelegate::paint( QPainter * painter, const QStyleOptionViewIt
QPixmap pix; QPixmap pix;
QString key = title + artist + artUrl QString key = title + artist + artUrl
+ QString( index.data( PLModel::IsCurrentRole ).toInt() ); + QString( index.data( PLModel::IsCurrentRole ).toBool() );
if(QPixmapCache::find( key, pix )) if(QPixmapCache::find( key, pix ))
{ {
// cool, we found it in the cache // cool, we found it in the cache
...@@ -108,7 +108,7 @@ void PlListViewItemDelegate::paint( QPainter * painter, const QStyleOptionViewIt ...@@ -108,7 +108,7 @@ void PlListViewItemDelegate::paint( QPainter * painter, const QStyleOptionViewIt
QPainter::Antialiasing | QPainter::SmoothPixmapTransform | QPainter::Antialiasing | QPainter::SmoothPixmapTransform |
QPainter::TextAntialiasing ); QPainter::TextAntialiasing );
if( index.data( PLModel::IsCurrentRole ).toInt() > 0 ) if( index.data( PLModel::IsCurrentRole ).toBool() )
{ {
pixpainter->save(); pixpainter->save();
pixpainter->setOpacity( 0.2 ); pixpainter->setOpacity( 0.2 );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment