mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-13 20:39:57 +01:00
Make sure to call spotifyaccount in main thread
This commit is contained in:
parent
14457750ff
commit
3f9046d61d
@ -133,16 +133,18 @@ SpotifyPlaylistUpdater::remove( bool askToDeletePlaylist )
|
||||
void
|
||||
SpotifyPlaylistUpdater::aboutToDelete()
|
||||
{
|
||||
if ( m_subscribed )
|
||||
if ( QThread::currentThread() != QApplication::instance()->thread() )
|
||||
QMetaObject::invokeMethod( const_cast<SpotifyPlaylistUpdater*>(this), "aboutToDelete", Qt::BlockingQueuedConnection );
|
||||
else
|
||||
{
|
||||
m_spotify.data()->setSubscribedForPlaylist( playlist(), false );
|
||||
}
|
||||
else if ( m_sync )
|
||||
{
|
||||
if ( QThread::currentThread() != QApplication::instance()->thread() )
|
||||
QMetaObject::invokeMethod( const_cast<SpotifyPlaylistUpdater*>(this), "checkDeleteDialog", Qt::BlockingQueuedConnection );
|
||||
else
|
||||
checkDeleteDialog();
|
||||
if ( m_subscribed )
|
||||
{
|
||||
m_spotify.data()->setSubscribedForPlaylist( playlist(), false );
|
||||
}
|
||||
else if ( m_sync )
|
||||
{
|
||||
checkDeleteDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,9 +72,8 @@ public slots:
|
||||
void tomahawkTracksMoved( const QList<Tomahawk::plentry_ptr>& ,int );
|
||||
void tomahawkPlaylistRenamed( const QString&, const QString& );
|
||||
|
||||
protected:
|
||||
void aboutToDelete();
|
||||
|
||||
|
||||
private slots:
|
||||
// SpotifyResolver message handlers, all take msgtype, msg as argument
|
||||
void onTracksInsertedReturn( const QString& msgType, const QVariantMap& msg, const QVariant& extraData );
|
||||
|
Loading…
x
Reference in New Issue
Block a user