From ac8a4b5a3a2d53164671e8ee066d377094b4b1ff Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sun, 6 Nov 2011 11:45:50 +0100 Subject: [PATCH] * Don't duplicate signal / slot connections in TreeModel. --- src/libtomahawk/playlist/treemodel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libtomahawk/playlist/treemodel.cpp b/src/libtomahawk/playlist/treemodel.cpp index 41920f2fb..68b7937a2 100644 --- a/src/libtomahawk/playlist/treemodel.cpp +++ b/src/libtomahawk/playlist/treemodel.cpp @@ -559,7 +559,7 @@ TreeModel::addAllCollections() QList 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( 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 ); }