1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 14:16:32 +02:00

Move more calls to the correct thread

This commit is contained in:
Uwe L. Korn
2014-07-01 21:41:19 +01:00
parent 14c5a92ba2
commit cb178c7c74

View File

@@ -817,6 +817,12 @@ AudioEngine::performLoadTrack( const Tomahawk::result_ptr result, const QString
void void
AudioEngine::loadPreviousTrack() AudioEngine::loadPreviousTrack()
{ {
if ( QThread::currentThread() != thread() )
{
QMetaObject::invokeMethod( this, "loadPreviousTrack", Qt::QueuedConnection );
return;
}
Q_D( AudioEngine ); Q_D( AudioEngine );
tDebug( LOGEXTRA ) << Q_FUNC_INFO; tDebug( LOGEXTRA ) << Q_FUNC_INFO;
@@ -844,6 +850,12 @@ AudioEngine::loadPreviousTrack()
void void
AudioEngine::loadNextTrack() AudioEngine::loadNextTrack()
{ {
if ( QThread::currentThread() != thread() )
{
QMetaObject::invokeMethod( this, "loadNextTrack", Qt::QueuedConnection );
return;
}
Q_D( AudioEngine ); Q_D( AudioEngine );
tDebug( LOGEXTRA ) << Q_FUNC_INFO; tDebug( LOGEXTRA ) << Q_FUNC_INFO;