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

remove qtscriptresolvers

This commit is contained in:
Leo Franchi
2011-03-17 22:58:25 -04:00
parent 25d0cee1f8
commit b631a6b3bd
2 changed files with 7 additions and 0 deletions

View File

@@ -39,12 +39,15 @@ QtScriptResolver::QtScriptResolver( const QString& scriptPath )
m_engine->moveToThread( m_thread ); m_engine->moveToThread( m_thread );
m_ready = true; m_ready = true;
Tomahawk::Pipeline::instance()->addResolver( this ); Tomahawk::Pipeline::instance()->addResolver( this );
connect( this, SIGNAL( destroyed( QObject* ) ), m_thread, SLOT( deleteLater() ) );
} }
QtScriptResolver::~QtScriptResolver() QtScriptResolver::~QtScriptResolver()
{ {
Tomahawk::Pipeline::instance()->removeResolver( this ); Tomahawk::Pipeline::instance()->removeResolver( this );
delete m_engine;
} }
@@ -109,4 +112,5 @@ void
QtScriptResolver::stop() QtScriptResolver::stop()
{ {
m_stopped = true; m_stopped = true;
emit finished();
} }

View File

@@ -56,6 +56,9 @@ public slots:
virtual void resolve( const Tomahawk::query_ptr& query ); virtual void resolve( const Tomahawk::query_ptr& query );
virtual void stop(); virtual void stop();
signals:
void finished();
private slots: private slots:
private: private: