mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-15 02:24:50 +02:00
* Fixed retrieving covers from QPixmapCache.
This commit is contained in:
@@ -290,7 +290,7 @@ Album::cover( const QSize& size, bool forceLoad ) const
|
|||||||
const QString cacheKey = QString( "%1_%2_%3" ).arg( infoid() ).arg( size.width() ).arg( size.height() );
|
const QString cacheKey = QString( "%1_%2_%3" ).arg( infoid() ).arg( size.width() ).arg( size.height() );
|
||||||
QPixmap cover;
|
QPixmap cover;
|
||||||
|
|
||||||
if ( !QPixmapCache::find( cacheKey, cover ) )
|
if ( !QPixmapCache::find( cacheKey, &cover ) )
|
||||||
{
|
{
|
||||||
cover = d->cover->scaled( size, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
cover = d->cover->scaled( size, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||||
QPixmapCache::insert( cacheKey, cover );
|
QPixmapCache::insert( cacheKey, cover );
|
||||||
|
@@ -629,7 +629,7 @@ Artist::cover( const QSize& size, bool forceLoad ) const
|
|||||||
const QString cacheKey = QString( "%1_%2_%3" ).arg( infoid() ).arg( size.width() ).arg( size.height() );
|
const QString cacheKey = QString( "%1_%2_%3" ).arg( infoid() ).arg( size.width() ).arg( size.height() );
|
||||||
QPixmap cover;
|
QPixmap cover;
|
||||||
|
|
||||||
if ( !QPixmapCache::find( cacheKey, cover ) )
|
if ( !QPixmapCache::find( cacheKey, &cover ) )
|
||||||
{
|
{
|
||||||
cover = m_cover->scaled( size, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
cover = m_cover->scaled( size, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||||
QPixmapCache::insert( cacheKey, cover );
|
QPixmapCache::insert( cacheKey, cover );
|
||||||
|
Reference in New Issue
Block a user