From 7fcbe72abbe975428a2c793e63fe13d50074e7e8 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sat, 29 Dec 2012 18:44:41 +0100 Subject: [PATCH] * Return CoverIDRole for artists and albums in a PlayableModel. --- src/libtomahawk/playlist/PlayableModel.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/libtomahawk/playlist/PlayableModel.cpp b/src/libtomahawk/playlist/PlayableModel.cpp index d00dcdff2..760b56c1c 100644 --- a/src/libtomahawk/playlist/PlayableModel.cpp +++ b/src/libtomahawk/playlist/PlayableModel.cpp @@ -162,6 +162,12 @@ PlayableModel::artistData( const artist_ptr& artist, int role ) const if ( role != Qt::DisplayRole ) // && role != Qt::ToolTipRole ) return QVariant(); + if ( role == CoverIDRole ) + { + artist->cover( QSize( 0, 0 ) ); + return artist->coverId(); + } + return artist->name(); } @@ -181,6 +187,12 @@ PlayableModel::albumData( const album_ptr& album, int role ) const if ( role != Qt::DisplayRole ) // && role != Qt::ToolTipRole ) return QVariant(); + if ( role == CoverIDRole ) + { + album->cover( QSize( 0, 0 ) ); + return album->coverId(); + } + return album->name(); }