mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-25 02:09:48 +01:00
Attempt to fix Leo's crash in destruction of infosystemworker
This commit is contained in:
parent
2a39355fb6
commit
4768f9acd7
@ -65,6 +65,7 @@ InfoSystem::InfoSystem(QObject *parent)
|
||||
m_worker->moveToThread( m_infoSystemWorkerThreadController );
|
||||
m_infoSystemWorkerThreadController->start();
|
||||
|
||||
QMetaObject::invokeMethod( m_worker, "init", Qt::QueuedConnection );
|
||||
QMetaObject::invokeMethod( m_worker, "newNam", Qt::QueuedConnection );
|
||||
|
||||
connect( TomahawkSettings::instance(), SIGNAL( changed() ), m_worker, SLOT( newNam() ) );
|
||||
|
@ -107,10 +107,7 @@ class DLLEXPORT InfoPlugin : public QObject
|
||||
public:
|
||||
InfoPlugin( InfoSystemWorker *parent );
|
||||
|
||||
virtual ~InfoPlugin()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
}
|
||||
virtual ~InfoPlugin() {}
|
||||
|
||||
signals:
|
||||
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()
|
||||
: 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 ) );
|
||||
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
|
||||
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 );
|
||||
|
||||
public slots:
|
||||
void init();
|
||||
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 newNam();
|
||||
|
Loading…
x
Reference in New Issue
Block a user