mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-21 05:11:44 +02:00
Only start track from the correct thread
This commit is contained in:
@@ -701,6 +701,16 @@ AudioEngine::performLoadIODevice( const result_ptr& result, const QString& url )
|
|||||||
void
|
void
|
||||||
AudioEngine::performLoadTrack( const Tomahawk::result_ptr result, const QString url, QSharedPointer< QIODevice > io )
|
AudioEngine::performLoadTrack( const Tomahawk::result_ptr result, const QString url, QSharedPointer< QIODevice > io )
|
||||||
{
|
{
|
||||||
|
if ( QThread::currentThread() != thread() )
|
||||||
|
{
|
||||||
|
QMetaObject::invokeMethod( this, "performLoadTrack", Qt::QueuedConnection,
|
||||||
|
Q_ARG( const Tomahawk::result_ptr, result ),
|
||||||
|
Q_ARG( const QString, url ),
|
||||||
|
Q_ARG( QSharedPointer< QIODevice >, io )
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Q_D( AudioEngine );
|
Q_D( AudioEngine );
|
||||||
if ( currentTrack() != result )
|
if ( currentTrack() != result )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user