Commit e2613339 authored by Jakob Leben's avatar Jakob Leben

Qt: cache "no-art" pixmap as well

parent 9af87f11
...@@ -82,7 +82,14 @@ QPixmap AbstractPlViewItemDelegate::getArtPixmap( const QModelIndex & index, con ...@@ -82,7 +82,14 @@ QPixmap AbstractPlViewItemDelegate::getArtPixmap( const QModelIndex & index, con
{ {
if( artUrl.isEmpty() || !artPix.load( artUrl ) ) if( artUrl.isEmpty() || !artPix.load( artUrl ) )
{ {
artPix = QPixmap( ":/noart" ).scaled( size, Qt::KeepAspectRatio, Qt::SmoothTransformation ); key = QString("noart%1%2").arg(size.width()).arg(size.height());
if( !QPixmapCache::find( key, artPix ) )
{
artPix = QPixmap( ":/noart" ).scaled( size,
Qt::KeepAspectRatio,
Qt::SmoothTransformation );
QPixmapCache::insert( key, artPix );
}
} }
else else
{ {
......
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