1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-21 05:11:44 +02:00

Don't parent ScriptJobs

This commit is contained in:
Dominik Schmidt
2015-01-21 23:03:00 +01:00
committed by Dominik Schmidt
parent 4cac256ba7
commit 745a6f9329
2 changed files with 1 additions and 4 deletions

View File

@@ -131,8 +131,6 @@ ScriptAccount::invoke( const scriptobject_ptr& scriptObject, const QString& meth
QString requestId = requestIdGenerator(); QString requestId = requestIdGenerator();
ScriptJob* job = new ScriptJob( requestId, scriptObject, methodName, arguments ); ScriptJob* job = new ScriptJob( requestId, scriptObject, methodName, arguments );
// TODO: setParent through QueuedConnection
connect( job, SIGNAL( destroyed( QString ) ), SLOT( onJobDeleted( QString ) ) ); connect( job, SIGNAL( destroyed( QString ) ), SLOT( onJobDeleted( QString ) ) );
m_jobs.insert( requestId, job ); m_jobs.insert( requestId, job );

View File

@@ -25,8 +25,7 @@
using namespace Tomahawk; using namespace Tomahawk;
ScriptJob::ScriptJob( const QString& id, const scriptobject_ptr& scriptObject, const QString& methodName, const QVariantMap& arguments ) ScriptJob::ScriptJob( const QString& id, const scriptobject_ptr& scriptObject, const QString& methodName, const QVariantMap& arguments )
: QObject( scriptObject->thread() == QThread::currentThread() ? scriptObject.data() : nullptr ) : m_error( false )
, m_error( false )
, m_id( id ) , m_id( id )
, m_scriptObject( scriptObject ) , m_scriptObject( scriptObject )
, m_methodName( methodName ) , m_methodName( methodName )