Commit 5bd79f38 authored by Michael Pyne's avatar Michael Pyne
Browse files

playlist: Clarify that static use of virtual methods in destructor is deliberate.

parent f4401608
......@@ -59,6 +59,11 @@ DynamicPlaylist::DynamicPlaylist(const PlaylistList &playlists,
DynamicPlaylist::~DynamicPlaylist()
{
// The Playlist dtor will later clear items when it runs, we need to make
// sure the list is accurate first while we're still able to
checkUpdateItems();
lower();
foreach(PlaylistDirtyObserver *observer, m_observers)
......
......@@ -169,8 +169,12 @@ Playlist::~Playlist()
{
// clearItem() will take care of removing the items from the history,
// so call clearItems() to make sure it happens.
//
// Some subclasses override clearItems and items so we manually dispatch to
// make clear that it's intentional that those subclassed versions don't
// get called (because we can't call them)
clearItems(items());
Playlist::clearItems(Playlist::items());
if(!m_shuttingDown)
m_collection->removePlaylist(this);
......
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