mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 15:59:42 +01:00
Only connect slots if needed
This commit is contained in:
parent
8214e954db
commit
61e1638228
@ -682,8 +682,18 @@ PlayableModel::insertInternal( const QList< T >& items, int row, const QList< To
|
||||
plitem->index = createIndex( row + i, 0, plitem );
|
||||
if ( plitem->query() )
|
||||
{
|
||||
connect( plitem->query().data(), SIGNAL( playableStateChanged( bool ) ), SLOT( onQueryBecamePlayable( bool ) ), Qt::UniqueConnection );
|
||||
connect( plitem->query().data(), SIGNAL( resolvingFinished( bool ) ), SLOT( onQueryResolved( bool ) ), Qt::UniqueConnection );
|
||||
if ( !plitem->query()->playable() )
|
||||
{
|
||||
connect( plitem->query().data(), SIGNAL( playableStateChanged( bool ) ),
|
||||
SLOT( onQueryBecamePlayable( bool ) ),
|
||||
Qt::UniqueConnection );
|
||||
}
|
||||
if ( !plitem->query()->resolvingFinished() )
|
||||
{
|
||||
connect( plitem->query().data(), SIGNAL( resolvingFinished( bool ) ),
|
||||
SLOT( onQueryResolved( bool ) ),
|
||||
Qt::UniqueConnection );
|
||||
}
|
||||
}
|
||||
|
||||
if ( logs.count() > i )
|
||||
|
Loading…
x
Reference in New Issue
Block a user