mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 21:57:41 +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:
@@ -145,6 +145,7 @@ PlaylistModel::clear()
|
|||||||
{
|
{
|
||||||
emit beginResetModel();
|
emit beginResetModel();
|
||||||
delete m_rootItem;
|
delete m_rootItem;
|
||||||
|
m_rootItem = 0;
|
||||||
emit endResetModel();
|
emit endResetModel();
|
||||||
m_rootItem = new PlItem( 0, this );
|
m_rootItem = new PlItem( 0, this );
|
||||||
}
|
}
|
||||||
|
@@ -51,7 +51,7 @@ public:
|
|||||||
|
|
||||||
Tomahawk::playlist_ptr playlist() const { return m_playlist; }
|
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 loadHistory( const Tomahawk::source_ptr& source, unsigned int amount = 50 );
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
|
Reference in New Issue
Block a user