mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-07 14:46:33 +02:00
* Fixed nasty bug when generating cache-key for images.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||||
*
|
*
|
||||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
* Copyright 2010-2014, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||||
* Copyright 2010-2012, Jeff Mitchell <jeff@tomahawk-player.org>
|
* Copyright 2010-2012, Jeff Mitchell <jeff@tomahawk-player.org>
|
||||||
*
|
*
|
||||||
* Tomahawk is free software: you can redistribute it and/or modify
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
@@ -287,7 +287,7 @@ Album::cover( const QSize& size, bool forceLoad ) const
|
|||||||
|
|
||||||
if ( d->cover && !d->cover->isNull() && !size.isEmpty() )
|
if ( d->cover && !d->cover->isNull() && !size.isEmpty() )
|
||||||
{
|
{
|
||||||
const QString cacheKey = infoid() + "_" + size.width();
|
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 ) )
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||||
*
|
*
|
||||||
* Copyright 2010-2013, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
* Copyright 2010-2014, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||||
* Copyright 2010-2012, Jeff Mitchell <jeff@tomahawk-player.org>
|
* Copyright 2010-2012, Jeff Mitchell <jeff@tomahawk-player.org>
|
||||||
* Copyright 2013, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2013, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
@@ -626,7 +626,7 @@ Artist::cover( const QSize& size, bool forceLoad ) const
|
|||||||
|
|
||||||
if ( m_cover && !m_cover->isNull() && !size.isEmpty() )
|
if ( m_cover && !m_cover->isNull() && !size.isEmpty() )
|
||||||
{
|
{
|
||||||
const QString cacheKey = infoid() + "_" + size.width();
|
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 ) )
|
||||||
|
Reference in New Issue
Block a user