1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-09 15:47:38 +02:00

* Hopefully fixed delete playlist crash.

This commit is contained in:
Christian Muehlhaeuser
2011-03-21 03:11:37 +01:00
parent d725594203
commit 04cbd72ef6
2 changed files with 5 additions and 5 deletions

View File

@@ -112,8 +112,8 @@ Collection::deleteDynamicPlaylist( const Tomahawk::dynplaylist_ptr& p )
m_dynplaylists.removeAll( p ); m_dynplaylists.removeAll( p );
qDebug() << Q_FUNC_INFO << "Collection name" << name() qDebug() << Q_FUNC_INFO << "Collection name" << name()
<< "from source id" << source()->id() << "from source id" << source()->id()
<< "numplaylists:" << m_playlists.length(); << "numplaylists:" << m_playlists.length();
emit dynamicPlaylistsDeleted( todelete ); emit dynamicPlaylistsDeleted( todelete );
} }

View File

@@ -139,8 +139,8 @@ SourceTreeItem::onPlaylistsDeleted( const QList<playlist_ptr>& playlists )
if ( type == SourcesModel::PlaylistSource && ptr == qlonglong( pl->data() ) ) if ( type == SourcesModel::PlaylistSource && ptr == qlonglong( pl->data() ) )
{ {
m_playlists.removeAll( p );
item->removeRow( i ); item->removeRow( i );
m_playlists.removeAll( p );
} }
} }
} }
@@ -244,8 +244,8 @@ SourceTreeItem::onDynamicPlaylistsDeleted( const QList< dynplaylist_ptr >& playl
//qDebug() << "Deleting dynamic playlist:" << pl->isNull(); //qDebug() << "Deleting dynamic playlist:" << pl->isNull();
if ( type == SourcesModel::DynamicPlaylistSource && ptr == qlonglong( pl->data() ) ) if ( type == SourcesModel::DynamicPlaylistSource && ptr == qlonglong( pl->data() ) )
{ {
m_dynplaylists.removeAll( p );
item->removeRow( i ); item->removeRow( i );
m_dynplaylists.removeAll( p );
} }
} }
} }