1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-01-18 23:17:59 +01:00

* Fixed nasty bug when generating cache-key for images.

This commit is contained in:
Christian Muehlhaeuser 2014-08-29 15:54:52 +02:00
parent 3f0fdb0e71
commit f5a3b90544
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
/* === 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>
*
* 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() )
{
const QString cacheKey = infoid() + "_" + size.width();
const QString cacheKey = QString( "%1_%2_%3" ).arg( infoid() ).arg( size.width() ).arg( size.height() );
QPixmap cover;
if ( !QPixmapCache::find( cacheKey, cover ) )

View File

@ -1,6 +1,6 @@
/* === 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 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() )
{
const QString cacheKey = infoid() + "_" + size.width();
const QString cacheKey = QString( "%1_%2_%3" ).arg( infoid() ).arg( size.width() ).arg( size.height() );
QPixmap cover;
if ( !QPixmapCache::find( cacheKey, cover ) )