From f5a3b90544a87e58df084adb883576def107f739 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Fri, 29 Aug 2014 15:54:52 +0200 Subject: [PATCH] * Fixed nasty bug when generating cache-key for images. --- src/libtomahawk/Album.cpp | 4 ++-- src/libtomahawk/Artist.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libtomahawk/Album.cpp b/src/libtomahawk/Album.cpp index 091c483a9..d3e8b1c3a 100644 --- a/src/libtomahawk/Album.cpp +++ b/src/libtomahawk/Album.cpp @@ -1,6 +1,6 @@ /* === This file is part of Tomahawk Player - === * - * Copyright 2010-2011, Christian Muehlhaeuser + * Copyright 2010-2014, Christian Muehlhaeuser * Copyright 2010-2012, Jeff Mitchell * * 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 ) ) diff --git a/src/libtomahawk/Artist.cpp b/src/libtomahawk/Artist.cpp index 2e670d9cd..ebcc279b6 100644 --- a/src/libtomahawk/Artist.cpp +++ b/src/libtomahawk/Artist.cpp @@ -1,6 +1,6 @@ /* === This file is part of Tomahawk Player - === * - * Copyright 2010-2013, Christian Muehlhaeuser + * Copyright 2010-2014, Christian Muehlhaeuser * Copyright 2010-2012, Jeff Mitchell * Copyright 2013, Teo Mrnjavac * @@ -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 ) )