diff --git a/src/libtomahawk/Playlist.cpp b/src/libtomahawk/Playlist.cpp index a90834132..3e21c36b5 100644 --- a/src/libtomahawk/Playlist.cpp +++ b/src/libtomahawk/Playlist.cpp @@ -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 ); diff --git a/src/libtomahawk/accounts/spotify/SpotifyPlaylistUpdater.h b/src/libtomahawk/accounts/spotify/SpotifyPlaylistUpdater.h index d72c17248..133ab1274 100644 --- a/src/libtomahawk/accounts/spotify/SpotifyPlaylistUpdater.h +++ b/src/libtomahawk/accounts/spotify/SpotifyPlaylistUpdater.h @@ -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 ); diff --git a/src/libtomahawk/playlist/PlaylistUpdaterInterface.h b/src/libtomahawk/playlist/PlaylistUpdaterInterface.h index 61885dd6d..92e46e235 100644 --- a/src/libtomahawk/playlist/PlaylistUpdaterInterface.h +++ b/src/libtomahawk/playlist/PlaylistUpdaterInterface.h @@ -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 ) {}