]> git.sesse.net Git - vlc/commitdiff
Qt: no need to go from bool to int
authorJakob Leben <jleben@videolan.org>
Fri, 29 Jan 2010 16:07:40 +0000 (17:07 +0100)
committerJakob Leben <jleben@videolan.org>
Fri, 29 Jan 2010 16:10:08 +0000 (17:10 +0100)
modules/gui/qt4/components/playlist/icon_view.cpp

index 2fb390f8502c74034e8ec551bb04c540f3becc27..4e1c7a9b84060900e7f1a4d2e2dd9511db1d5339 100644 (file)
@@ -83,7 +83,7 @@ void PlListViewItemDelegate::paint( QPainter * painter, const QStyleOptionViewIt
     QPixmap pix;
 
     QString key = title + artist + artUrl
-                  + QString( index.data( PLModel::IsCurrentRole ).toInt() );
+                  + QString( index.data( PLModel::IsCurrentRole ).toBool() );
     if(QPixmapCache::find( key, pix ))
     {
         // cool, we found it in the cache
@@ -108,7 +108,7 @@ void PlListViewItemDelegate::paint( QPainter * painter, const QStyleOptionViewIt
             QPainter::Antialiasing | QPainter::SmoothPixmapTransform |
             QPainter::TextAntialiasing );
 
-    if( index.data( PLModel::IsCurrentRole ).toInt() > 0 )
+    if( index.data( PLModel::IsCurrentRole ).toBool() )
     {
        pixpainter->save();
        pixpainter->setOpacity( 0.2 );