Commit db250141 authored by Michael Pyne's avatar Michael Pyne
Browse files

Delete the list view entry for a removed playlist as soon as it's removed instead of waiting

for the QObject::destroyed() signal.  Seems to fix a crash if an exception is thrown while
loading the cached music items.

svn path=/trunk/KDE/kdemultimedia/juk/; revision=936616
parent 9c482e67
......@@ -265,8 +265,10 @@ void PlaylistBox::setupPlaylist(Playlist *playlist, const QString &iconName, Ite
void PlaylistBox::removePlaylist(Playlist *playlist)
// Could be false if setup() wasn't run yet.
if(m_playlistDict.contains(playlist)) {
delete m_playlistDict[playlist]; // Delete the Item*
......@@ -832,7 +834,6 @@ void PlaylistBox::Item::init()
if(m_playlist) {
connect(m_playlist, SIGNAL(signalNameChanged(const QString &)),
this, SLOT(slotSetName(const QString &)));
connect(m_playlist, SIGNAL(destroyed()), this, SLOT(deleteLater()));
connect(m_playlist, SIGNAL(signalEnableDirWatch(bool)),
list->object(), SLOT(slotEnableDirWatch(bool)));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment