Commit 6621e1c9 authored by Michael Pyne's avatar Michael Pyne

Remove the now playing bar and the search widget on shutdown before deleting...

Remove the now playing bar and the search widget on shutdown before deleting the playlist collection.

I think this is the cause of bug 175035 and since I can't reproduce I'm just going to assume it works. ;)

CCBUG:175035

svn path=/trunk/KDE/kdemultimedia/juk/; revision=918037
parent 0c03abd1
......@@ -48,7 +48,8 @@ PlaylistSplitter::PlaylistSplitter(QWidget *parent, const char *name) :
m_playlistBox(0),
m_searchWidget(0),
m_playlistStack(0),
m_editor(0)
m_editor(0),
m_nowPlaying(0)
{
setObjectName(name);
......@@ -64,6 +65,12 @@ PlaylistSplitter::~PlaylistSplitter()
{
saveConfig();
// NowPlaying depends on the PlaylistCollection, so kill it now.
delete m_nowPlaying;
m_nowPlaying = 0;
delete m_searchWidget; // Take no chances here either.
// Since we want to ensure that the shutdown process for the PlaylistCollection
// (a base class for PlaylistBox) has a chance to write the playlists to disk
// before they are deleted we're explicitly deleting the PlaylistBox here.
......@@ -190,7 +197,7 @@ void PlaylistSplitter::setupLayout()
insertWidget(0, m_playlistBox);
NowPlaying *nowPlaying = new NowPlaying(top, m_playlistBox);
m_nowPlaying = new NowPlaying(top, m_playlistBox);
// Create the search widget -- this must be done after the CollectionList is created.
......@@ -208,7 +215,7 @@ void PlaylistSplitter::setupLayout()
connect(ActionCollection::action<KToggleAction>("showSearch"), SIGNAL(toggled(bool)),
m_searchWidget, SLOT(setEnabled(bool)));
topLayout->addWidget(nowPlaying);
topLayout->addWidget(m_nowPlaying);
topLayout->addWidget(m_searchWidget);
topLayout->addWidget(m_playlistStack, 1);
......
......@@ -25,6 +25,7 @@ class SearchWidget;
class PlaylistInterface;
class TagEditor;
class PlaylistBox;
class NowPlaying;
/**
* This is the main layout class of JuK. It should contain a PlaylistBox and
......@@ -81,6 +82,7 @@ private:
SearchWidget *m_searchWidget;
QStackedWidget *m_playlistStack;
TagEditor *m_editor;
NowPlaying *m_nowPlaying;
};
#endif
......
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