mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-09 07:36:48 +02:00
* Hopefully fixed delete playlist crash.
This commit is contained in:
@@ -110,10 +110,10 @@ Collection::deleteDynamicPlaylist( const Tomahawk::dynplaylist_ptr& p )
|
|||||||
QList<dynplaylist_ptr> todelete;
|
QList<dynplaylist_ptr> todelete;
|
||||||
todelete << p;
|
todelete << 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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user