mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-02-25 20:33:20 +01:00
* Emit Playlist::aboutToBeDeleted from inside Playlist.
This commit is contained in:
parent
0beac78da8
commit
2244f23fde
@ -503,10 +503,13 @@ void
|
||||
Playlist::removeFromDatabase()
|
||||
{
|
||||
Q_D( Playlist );
|
||||
|
||||
emit aboutToBeDeleted( d->weakSelf.toStrongRef() );
|
||||
DatabaseCommand_DeletePlaylist* cmd = new DatabaseCommand_DeletePlaylist( d->source, d->guid );
|
||||
Database::instance()->enqueue( Tomahawk::dbcmd_ptr(cmd) );
|
||||
Database::instance()->enqueue( Tomahawk::dbcmd_ptr( cmd ) );
|
||||
}
|
||||
|
||||
|
||||
Playlist::Playlist( PlaylistPrivate *d )
|
||||
: d_ptr( d )
|
||||
{
|
||||
@ -906,7 +909,6 @@ Playlist::updaters() const
|
||||
void
|
||||
PlaylistRemovalHandler::remove( const playlist_ptr& playlist )
|
||||
{
|
||||
emit playlist->aboutToBeDeleted( playlist );
|
||||
playlist->removeFromDatabase();
|
||||
}
|
||||
|
||||
|
@ -87,9 +87,9 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Playlist* q_ptr;
|
||||
Q_DECLARE_PUBLIC ( Playlist )
|
||||
|
||||
private:
|
||||
QWeakPointer< Playlist > weakSelf;
|
||||
source_ptr source;
|
||||
|
Loading…
x
Reference in New Issue
Block a user