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