1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-09-01 01:51:58 +02:00

Merge branch 'qmlstation' of github.com:tomahawk-player/tomahawk into qmlstation

This commit is contained in:
Michael Zanetti
2012-12-02 21:07:47 +01:00
2 changed files with 24 additions and 0 deletions

View File

@@ -212,6 +212,14 @@ PlayableItem::artistName() const
{
return m_query->artist();
}
else if ( !m_album.isNull() )
{
return m_album->artist()->name();
}
else if ( !m_artist.isNull() )
{
return m_artist->name();
}
return QString();
}
@@ -228,6 +236,10 @@ PlayableItem::albumName() const
{
return m_query->album();
}
else if ( !m_album.isNull() )
{
return m_album->name();
}
return QString();
}

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