mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 09:04:33 +02:00
* Break loops if we found the right SourceTreeItem.
This commit is contained in:
@@ -141,6 +141,7 @@ SourceTreeItem::onPlaylistsDeleted( const QList<playlist_ptr>& playlists )
|
|||||||
{
|
{
|
||||||
item->removeRow( i );
|
item->removeRow( i );
|
||||||
m_playlists.removeAll( p );
|
m_playlists.removeAll( p );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -165,6 +166,7 @@ SourceTreeItem::onPlaylistLoaded( Tomahawk::PlaylistRevision revision )
|
|||||||
{
|
{
|
||||||
pi->setEnabled( true );
|
pi->setEnabled( true );
|
||||||
m_current_revisions.insert( pl->data()->guid(), revision.revisionguid );
|
m_current_revisions.insert( pl->data()->guid(), revision.revisionguid );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -188,7 +190,10 @@ SourceTreeItem::onPlaylistChanged()
|
|||||||
playlist_ptr* pl = reinterpret_cast<playlist_ptr*>(piptr);
|
playlist_ptr* pl = reinterpret_cast<playlist_ptr*>(piptr);
|
||||||
|
|
||||||
if ( ptr == qlonglong( pl->data() ) )
|
if ( ptr == qlonglong( pl->data() ) )
|
||||||
|
{
|
||||||
pi->setText( pl->data()->title() );
|
pi->setText( pl->data()->title() );
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ( type == SourcesModel::DynamicPlaylistSource )
|
if ( type == SourcesModel::DynamicPlaylistSource )
|
||||||
{
|
{
|
||||||
@@ -196,7 +201,10 @@ SourceTreeItem::onPlaylistChanged()
|
|||||||
dynplaylist_ptr* pl = reinterpret_cast<dynplaylist_ptr*>(piptr);
|
dynplaylist_ptr* pl = reinterpret_cast<dynplaylist_ptr*>(piptr);
|
||||||
|
|
||||||
if ( ptr == qlonglong( pl->data() ) )
|
if ( ptr == qlonglong( pl->data() ) )
|
||||||
|
{
|
||||||
pi->setText( pl->data()->title() );
|
pi->setText( pl->data()->title() );
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -246,6 +254,7 @@ SourceTreeItem::onDynamicPlaylistsDeleted( const QList< dynplaylist_ptr >& playl
|
|||||||
{
|
{
|
||||||
item->removeRow( i );
|
item->removeRow( i );
|
||||||
m_dynplaylists.removeAll( p );
|
m_dynplaylists.removeAll( p );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -270,6 +279,7 @@ SourceTreeItem::onDynamicPlaylistLoaded( DynamicPlaylistRevision revision )
|
|||||||
{
|
{
|
||||||
pi->setEnabled( true );
|
pi->setEnabled( true );
|
||||||
m_current_dynamic_revisions.insert( pl->data()->guid(), revision.revisionguid );
|
m_current_dynamic_revisions.insert( pl->data()->guid(), revision.revisionguid );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user