mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-23 22:25:11 +02:00
Make sure to call spotifyaccount in main thread
This commit is contained in:
@@ -132,6 +132,10 @@ SpotifyPlaylistUpdater::remove( bool askToDeletePlaylist )
|
|||||||
|
|
||||||
void
|
void
|
||||||
SpotifyPlaylistUpdater::aboutToDelete()
|
SpotifyPlaylistUpdater::aboutToDelete()
|
||||||
|
{
|
||||||
|
if ( QThread::currentThread() != QApplication::instance()->thread() )
|
||||||
|
QMetaObject::invokeMethod( const_cast<SpotifyPlaylistUpdater*>(this), "aboutToDelete", Qt::BlockingQueuedConnection );
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if ( m_subscribed )
|
if ( m_subscribed )
|
||||||
{
|
{
|
||||||
@@ -139,12 +143,10 @@ SpotifyPlaylistUpdater::aboutToDelete()
|
|||||||
}
|
}
|
||||||
else if ( m_sync )
|
else if ( m_sync )
|
||||||
{
|
{
|
||||||
if ( QThread::currentThread() != QApplication::instance()->thread() )
|
|
||||||
QMetaObject::invokeMethod( const_cast<SpotifyPlaylistUpdater*>(this), "checkDeleteDialog", Qt::BlockingQueuedConnection );
|
|
||||||
else
|
|
||||||
checkDeleteDialog();
|
checkDeleteDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -72,7 +72,6 @@ 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:
|
||||||
|
Reference in New Issue
Block a user