mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
* Be prepared for avatar-less sources.
This commit is contained in:
@@ -39,7 +39,7 @@ TreeModel::TreeModel( QObject* parent )
|
|||||||
, m_rootItem( new TreeModelItem( 0, this ) )
|
, m_rootItem( new TreeModelItem( 0, this ) )
|
||||||
, m_columnStyle( AllColumns )
|
, m_columnStyle( AllColumns )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
setIcon( QPixmap( RESPATH "images/music-icon.png" ) );
|
||||||
|
|
||||||
connect( AudioEngine::instance(), SIGNAL( finished( Tomahawk::result_ptr ) ), SLOT( onPlaybackFinished( Tomahawk::result_ptr ) ), Qt::DirectConnection );
|
connect( AudioEngine::instance(), SIGNAL( finished( Tomahawk::result_ptr ) ), SLOT( onPlaybackFinished( Tomahawk::result_ptr ) ), Qt::DirectConnection );
|
||||||
connect( AudioEngine::instance(), SIGNAL( stopped() ), SLOT( onPlaybackStopped() ), Qt::DirectConnection );
|
connect( AudioEngine::instance(), SIGNAL( stopped() ), SLOT( onPlaybackStopped() ), Qt::DirectConnection );
|
||||||
@@ -614,7 +614,9 @@ TreeModel::addCollection( const collection_ptr& collection )
|
|||||||
|
|
||||||
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>( cmd ) );
|
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>( cmd ) );
|
||||||
|
|
||||||
setIcon( collection->source()->avatar() );
|
if ( !collection->source()->avatar().isNull() )
|
||||||
|
setIcon( collection->source()->avatar() );
|
||||||
|
|
||||||
if ( collection->source()->isLocal() )
|
if ( collection->source()->isLocal() )
|
||||||
setTitle( tr( "Your Collection" ) );
|
setTitle( tr( "Your Collection" ) );
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user