mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
* Fixed thread afinity issue related to WebKit.
This commit is contained in:
@@ -68,6 +68,13 @@ QtScriptResolver::~QtScriptResolver()
|
|||||||
void
|
void
|
||||||
QtScriptResolver::resolve( const Tomahawk::query_ptr& query )
|
QtScriptResolver::resolve( const Tomahawk::query_ptr& query )
|
||||||
{
|
{
|
||||||
|
if ( QThread::currentThread() != thread() )
|
||||||
|
{
|
||||||
|
qDebug() << "Reinvoking in correct thread:" << Q_FUNC_INFO;
|
||||||
|
QMetaObject::invokeMethod( this, "resolve", Qt::QueuedConnection, Q_ARG(Tomahawk::query_ptr, query) );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
qDebug() << Q_FUNC_INFO << query->toString();
|
qDebug() << Q_FUNC_INFO << query->toString();
|
||||||
QString eval = QString( "resolve( '%1', '%2', '%3', '%4' );" )
|
QString eval = QString( "resolve( '%1', '%2', '%3', '%4' );" )
|
||||||
.arg( query->id().replace( "'", "\\'" ) )
|
.arg( query->id().replace( "'", "\\'" ) )
|
||||||
|
Reference in New Issue
Block a user