mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-19 12:21:52 +02:00
Call playlist results if an updater has a custom deleter regardless
This commit is contained in:
@@ -318,7 +318,7 @@ Playlist::hasCustomDeleter() const
|
|||||||
{
|
{
|
||||||
foreach ( PlaylistUpdaterInterface* updater, m_updaters )
|
foreach ( PlaylistUpdaterInterface* updater, m_updaters )
|
||||||
{
|
{
|
||||||
if ( !updater->deleteQuestions().isEmpty() )
|
if ( updater->hasCustomDeleter() )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -341,7 +341,6 @@ Playlist::customDelete( const QPoint& leftCenter )
|
|||||||
questions.append( updater->deleteQuestions() );
|
questions.append( updater->deleteQuestions() );
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_ASSERT( !questions.isEmpty() );
|
|
||||||
SourceTreePopupDialog* dialog = new SourceTreePopupDialog;
|
SourceTreePopupDialog* dialog = new SourceTreePopupDialog;
|
||||||
NewClosure( dialog, SIGNAL( result( bool ) ), this, SLOT( onDeleteResult( SourceTreePopupDialog* ) ), dialog );
|
NewClosure( dialog, SIGNAL( result( bool ) ), this, SLOT( onDeleteResult( SourceTreePopupDialog* ) ), dialog );
|
||||||
|
|
||||||
|
@@ -64,6 +64,7 @@ public:
|
|||||||
void setCanSubscribe( bool canSub );
|
void setCanSubscribe( bool canSub );
|
||||||
QString spotifyId() const { return m_spotifyId; }
|
QString spotifyId() const { return m_spotifyId; }
|
||||||
|
|
||||||
|
virtual bool hasCustomDeleter() const { return true; }
|
||||||
virtual Tomahawk::PlaylistDeleteQuestions deleteQuestions() const;
|
virtual Tomahawk::PlaylistDeleteQuestions deleteQuestions() const;
|
||||||
virtual void setQuestionResults( const QMap< int, bool > results );
|
virtual void setQuestionResults( const QMap< int, bool > results );
|
||||||
|
|
||||||
|
@@ -87,6 +87,7 @@ public:
|
|||||||
|
|
||||||
// The int data value associated with each question must be unique across *all* playlist updaters,
|
// 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.
|
// as setQuestionResults is called with all questions from all updaters.
|
||||||
|
virtual bool hasCustomDeleter() const { return false; }
|
||||||
virtual PlaylistDeleteQuestions deleteQuestions() const { return PlaylistDeleteQuestions(); }
|
virtual PlaylistDeleteQuestions deleteQuestions() const { return PlaylistDeleteQuestions(); }
|
||||||
virtual void setQuestionResults( const QMap< int, bool > results ) {}
|
virtual void setQuestionResults( const QMap< int, bool > results ) {}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user