1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-09-03 10:53:39 +02:00

* Return artist & album cover-ids from PlayableModel.

This commit is contained in:
Christian Muehlhaeuser
2012-12-02 21:04:17 +01:00
parent 8971c2dfe8
commit 533f717d35

View File

@@ -153,6 +153,12 @@ PlayableModel::artistData( const artist_ptr& artist, int role ) const
if ( role == Qt::SizeHintRole )
return QSize( 0, 44 );
if ( role == CoverIDRole )
{
artist->cover( QSize( 0, 0 ) );
return artist->coverId();
}
if ( role != Qt::DisplayRole ) // && role != Qt::ToolTipRole )
return QVariant();
@@ -166,6 +172,12 @@ PlayableModel::albumData( const album_ptr& album, int role ) const
if ( role == Qt::SizeHintRole )
return QSize( 0, 32 );
if ( role == CoverIDRole )
{
album->cover( QSize( 0, 0 ) );
return album->coverId();
}
if ( role != Qt::DisplayRole ) // && role != Qt::ToolTipRole )
return QVariant();