1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-13 20:39:57 +01:00

Call playlist results if an updater has a custom deleter regardless

This commit is contained in:
Leo Franchi 2012-07-26 22:41:50 -04:00
parent 216759b214
commit 3fbd58fcc9
3 changed files with 3 additions and 2 deletions

View File

@ -318,7 +318,7 @@ Playlist::hasCustomDeleter() const
{
foreach ( PlaylistUpdaterInterface* updater, m_updaters )
{
if ( !updater->deleteQuestions().isEmpty() )
if ( updater->hasCustomDeleter() )
return true;
}
@ -341,7 +341,6 @@ Playlist::customDelete( const QPoint& leftCenter )
questions.append( updater->deleteQuestions() );
}
Q_ASSERT( !questions.isEmpty() );
SourceTreePopupDialog* dialog = new SourceTreePopupDialog;
NewClosure( dialog, SIGNAL( result( bool ) ), this, SLOT( onDeleteResult( SourceTreePopupDialog* ) ), dialog );

View File

@ -64,6 +64,7 @@ public:
void setCanSubscribe( bool canSub );
QString spotifyId() const { return m_spotifyId; }
virtual bool hasCustomDeleter() const { return true; }
virtual Tomahawk::PlaylistDeleteQuestions deleteQuestions() const;
virtual void setQuestionResults( const QMap< int, bool > results );

View File

@ -87,6 +87,7 @@ public:
// The int data value associated with each question must be unique across *all* playlist updaters,
// as setQuestionResults is called with all questions from all updaters.
virtual bool hasCustomDeleter() const { return false; }
virtual PlaylistDeleteQuestions deleteQuestions() const { return PlaylistDeleteQuestions(); }
virtual void setQuestionResults( const QMap< int, bool > results ) {}