mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-19 12:21:52 +02:00
fix deleting on exit
This commit is contained in:
@@ -358,7 +358,7 @@ SpotifyAccount::resolverMessage( const QString &msgType, const QVariantMap &msg
|
||||
else if( msgType == "userChanged" )
|
||||
{
|
||||
const QString rmsg = msg.value( "msg" ).toString();
|
||||
clearUser();
|
||||
clearUser( true );
|
||||
|
||||
if ( m_configWidget.data() )
|
||||
m_configWidget.data()->setPlaylists( QList< SpotifyPlaylistInfo* >() );
|
||||
@@ -386,10 +386,15 @@ SpotifyAccount::resolverMessage( const QString &msgType, const QVariantMap &msg
|
||||
|
||||
|
||||
void
|
||||
SpotifyAccount::clearUser()
|
||||
SpotifyAccount::clearUser( bool permanentlyDelete )
|
||||
{
|
||||
foreach( SpotifyPlaylistUpdater* updater, m_updaters.values() )
|
||||
{
|
||||
if ( permanentlyDelete )
|
||||
updater->remove();
|
||||
else
|
||||
updater->deleteLater();
|
||||
}
|
||||
|
||||
m_updaters.clear();
|
||||
|
||||
|
@@ -110,7 +110,7 @@ private slots:
|
||||
private:
|
||||
void init();
|
||||
void loadPlaylists();
|
||||
void clearUser();
|
||||
void clearUser( bool permanentlyDelete = false );
|
||||
|
||||
void startPlaylistSync( SpotifyPlaylistInfo* playlist );
|
||||
void stopPlaylistSync( SpotifyPlaylistInfo* playlist, bool forceDontDelete = false );
|
||||
|
Reference in New Issue
Block a user