1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-31 09:32:03 +02:00

* Return CoverIDRole for artists and albums in a PlayableModel.

This commit is contained in:
Christian Muehlhaeuser
2012-12-29 18:44:41 +01:00
parent a1148ece05
commit 7fcbe72abb

View File

@@ -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();
}