1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-29 16:50:11 +02:00

* Don't duplicate signal / slot connections in TreeModel.

This commit is contained in:
Christian Muehlhaeuser
2011-11-06 11:45:50 +01:00
parent e3bb4c9b14
commit ac8a4b5a3a

View File

@@ -559,7 +559,7 @@ TreeModel::addAllCollections()
QList<Tomahawk::source_ptr> sources = SourceList::instance()->sources();
foreach ( const source_ptr& source, sources )
{
connect( source->collection().data(), SIGNAL( changed() ), SLOT( onCollectionChanged() ) );
connect( source->collection().data(), SIGNAL( changed() ), SLOT( onCollectionChanged() ), Qt::UniqueConnection );
}
m_title = tr( "All Artists" );
@@ -668,7 +668,7 @@ TreeModel::addCollection( const collection_ptr& collection )
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>( cmd ) );
connect( collection.data(), SIGNAL( changed() ), SLOT( onCollectionChanged() ) );
connect( collection.data(), SIGNAL( changed() ), SLOT( onCollectionChanged() ), Qt::UniqueConnection );
if ( !collection->source()->avatar().isNull() )
setIcon( collection->source()->avatar() );
@@ -708,7 +708,7 @@ TreeModel::addFilteredCollection( const collection_ptr& collection, unsigned int
void
TreeModel::onSourceAdded( const Tomahawk::source_ptr& source )
{
connect( source->collection().data(), SIGNAL( changed() ), SLOT( onCollectionChanged() ) );
connect( source->collection().data(), SIGNAL( changed() ), SLOT( onCollectionChanged() ), Qt::UniqueConnection );
}