From 04cbd72ef67b14014fc53c3ce49d015bba4fd6b8 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Mon, 21 Mar 2011 03:11:37 +0100 Subject: [PATCH] * Hopefully fixed delete playlist crash. --- src/libtomahawk/collection.cpp | 6 +++--- src/sourcetree/sourcetreeitem.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libtomahawk/collection.cpp b/src/libtomahawk/collection.cpp index 47b42c014..e02acd260 100644 --- a/src/libtomahawk/collection.cpp +++ b/src/libtomahawk/collection.cpp @@ -110,10 +110,10 @@ Collection::deleteDynamicPlaylist( const Tomahawk::dynplaylist_ptr& p ) QList todelete; todelete << p; m_dynplaylists.removeAll( p ); - + qDebug() << Q_FUNC_INFO << "Collection name" << name() - << "from source id" << source()->id() - << "numplaylists:" << m_playlists.length(); + << "from source id" << source()->id() + << "numplaylists:" << m_playlists.length(); emit dynamicPlaylistsDeleted( todelete ); } diff --git a/src/sourcetree/sourcetreeitem.cpp b/src/sourcetree/sourcetreeitem.cpp index 1a8728931..d2cd3adc1 100644 --- a/src/sourcetree/sourcetreeitem.cpp +++ b/src/sourcetree/sourcetreeitem.cpp @@ -139,8 +139,8 @@ SourceTreeItem::onPlaylistsDeleted( const QList& playlists ) if ( type == SourcesModel::PlaylistSource && ptr == qlonglong( pl->data() ) ) { - m_playlists.removeAll( p ); item->removeRow( i ); + m_playlists.removeAll( p ); } } } @@ -244,8 +244,8 @@ SourceTreeItem::onDynamicPlaylistsDeleted( const QList< dynplaylist_ptr >& playl //qDebug() << "Deleting dynamic playlist:" << pl->isNull(); if ( type == SourcesModel::DynamicPlaylistSource && ptr == qlonglong( pl->data() ) ) { - m_dynplaylists.removeAll( p ); item->removeRow( i ); + m_dynplaylists.removeAll( p ); } } }