From 1f955ae8d535d3707e72e45b3a15001707a80ff5 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Tue, 6 Sep 2011 05:59:47 +0200 Subject: [PATCH] * Be prepared for avatar-less sources. --- src/libtomahawk/playlist/treemodel.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libtomahawk/playlist/treemodel.cpp b/src/libtomahawk/playlist/treemodel.cpp index f46752b4a..8d5b634ab 100644 --- a/src/libtomahawk/playlist/treemodel.cpp +++ b/src/libtomahawk/playlist/treemodel.cpp @@ -39,7 +39,7 @@ TreeModel::TreeModel( QObject* parent ) , m_rootItem( new TreeModelItem( 0, this ) ) , 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( stopped() ), SLOT( onPlaybackStopped() ), Qt::DirectConnection ); @@ -614,7 +614,9 @@ TreeModel::addCollection( const collection_ptr& collection ) Database::instance()->enqueue( QSharedPointer( cmd ) ); - setIcon( collection->source()->avatar() ); + if ( !collection->source()->avatar().isNull() ) + setIcon( collection->source()->avatar() ); + if ( collection->source()->isLocal() ) setTitle( tr( "Your Collection" ) ); else