mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 11:20:22 +02:00
Attempt to fix Leo's crash in destruction of infosystemworker
This commit is contained in:
@@ -65,6 +65,7 @@ InfoSystem::InfoSystem(QObject *parent)
|
|||||||
m_worker->moveToThread( m_infoSystemWorkerThreadController );
|
m_worker->moveToThread( m_infoSystemWorkerThreadController );
|
||||||
m_infoSystemWorkerThreadController->start();
|
m_infoSystemWorkerThreadController->start();
|
||||||
|
|
||||||
|
QMetaObject::invokeMethod( m_worker, "init", Qt::QueuedConnection );
|
||||||
QMetaObject::invokeMethod( m_worker, "newNam", Qt::QueuedConnection );
|
QMetaObject::invokeMethod( m_worker, "newNam", Qt::QueuedConnection );
|
||||||
|
|
||||||
connect( TomahawkSettings::instance(), SIGNAL( changed() ), m_worker, SLOT( newNam() ) );
|
connect( TomahawkSettings::instance(), SIGNAL( changed() ), m_worker, SLOT( newNam() ) );
|
||||||
|
@@ -107,10 +107,7 @@ class DLLEXPORT InfoPlugin : public QObject
|
|||||||
public:
|
public:
|
||||||
InfoPlugin( InfoSystemWorker *parent );
|
InfoPlugin( InfoSystemWorker *parent );
|
||||||
|
|
||||||
virtual ~InfoPlugin()
|
virtual ~InfoPlugin() {}
|
||||||
{
|
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
}
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void getCachedInfo( Tomahawk::InfoSystem::InfoCriteriaHash criteria, qint64 newMaxAge, QString caller, Tomahawk::InfoSystem::InfoType type, QVariant input, Tomahawk::InfoSystem::InfoCustomData customData );
|
void getCachedInfo( Tomahawk::InfoSystem::InfoCriteriaHash criteria, qint64 newMaxAge, QString caller, Tomahawk::InfoSystem::InfoType type, QVariant input, Tomahawk::InfoSystem::InfoCustomData customData );
|
||||||
|
@@ -35,6 +35,23 @@ namespace InfoSystem
|
|||||||
|
|
||||||
InfoSystemWorker::InfoSystemWorker()
|
InfoSystemWorker::InfoSystemWorker()
|
||||||
: m_nam( 0 )
|
: m_nam( 0 )
|
||||||
|
{
|
||||||
|
qDebug() << Q_FUNC_INFO;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
InfoSystemWorker::~InfoSystemWorker()
|
||||||
|
{
|
||||||
|
qDebug() << Q_FUNC_INFO;
|
||||||
|
Q_FOREACH( InfoPluginPtr plugin, m_plugins )
|
||||||
|
{
|
||||||
|
if( plugin )
|
||||||
|
delete plugin.data();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void InfoSystemWorker::init()
|
||||||
{
|
{
|
||||||
InfoPluginPtr enptr( new EchoNestPlugin( this ) );
|
InfoPluginPtr enptr( new EchoNestPlugin( this ) );
|
||||||
m_plugins.append( enptr );
|
m_plugins.append( enptr );
|
||||||
@@ -77,17 +94,6 @@ InfoSystemWorker::InfoSystemWorker()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
InfoSystemWorker::~InfoSystemWorker()
|
|
||||||
{
|
|
||||||
qDebug() << Q_FUNC_INFO;
|
|
||||||
Q_FOREACH( InfoPluginPtr plugin, m_plugins )
|
|
||||||
{
|
|
||||||
if( plugin )
|
|
||||||
delete plugin.data();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
InfoSystemWorker::registerInfoTypes( const InfoPluginPtr &plugin, const QSet< InfoType >& getTypes, const QSet< InfoType >& pushTypes )
|
InfoSystemWorker::registerInfoTypes( const InfoPluginPtr &plugin, const QSet< InfoType >& getTypes, const QSet< InfoType >& pushTypes )
|
||||||
{
|
{
|
||||||
|
@@ -51,6 +51,7 @@ signals:
|
|||||||
void info( QString target, Tomahawk::InfoSystem::InfoType, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomData customData );
|
void info( QString target, Tomahawk::InfoSystem::InfoType, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomData customData );
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
void init();
|
||||||
void getInfo( const QString caller, const Tomahawk::InfoSystem::InfoType type, const QVariant input, const Tomahawk::InfoSystem::InfoCustomData customData );
|
void getInfo( const QString caller, const Tomahawk::InfoSystem::InfoType type, const QVariant input, const Tomahawk::InfoSystem::InfoCustomData customData );
|
||||||
void pushInfo( const QString caller, const Tomahawk::InfoSystem::InfoType type, const QVariant input );
|
void pushInfo( const QString caller, const Tomahawk::InfoSystem::InfoType type, const QVariant input );
|
||||||
void newNam();
|
void newNam();
|
||||||
|
Reference in New Issue
Block a user