1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-14 04:51:53 +02:00

set dangling pointer to 0 so if a proxymodel gets called during resetting, it can tell if a plitem is gone

This commit is contained in:
Leo Franchi 2011-03-22 18:36:07 -04:00
parent 18453f886f
commit bd54916fe3
2 changed files with 2 additions and 1 deletions
src/libtomahawk/playlist

@ -145,6 +145,7 @@ PlaylistModel::clear()
{
emit beginResetModel();
delete m_rootItem;
m_rootItem = 0;
emit endResetModel();
m_rootItem = new PlItem( 0, this );
}

@ -51,7 +51,7 @@ public:
Tomahawk::playlist_ptr playlist() const { return m_playlist; }
void loadPlaylist( const Tomahawk::playlist_ptr& playlist, bool loadEntries = true );
virtual void loadPlaylist( const Tomahawk::playlist_ptr& playlist, bool loadEntries = true );
void loadHistory( const Tomahawk::source_ptr& source, unsigned int amount = 50 );
void clear();