mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
Don't let the InfoSystem take over ownership of info plugins
This commit is contained in:
@@ -357,7 +357,10 @@ XmppSipPlugin::onDisconnect( Jreen::Client::DisconnectReason reason )
|
|||||||
removeMenuHelper();
|
removeMenuHelper();
|
||||||
|
|
||||||
if ( !m_infoPlugin.isNull() )
|
if ( !m_infoPlugin.isNull() )
|
||||||
|
{
|
||||||
Tomahawk::InfoSystem::InfoSystem::instance()->removeInfoPlugin( infoPlugin() );
|
Tomahawk::InfoSystem::InfoSystem::instance()->removeInfoPlugin( infoPlugin() );
|
||||||
|
delete m_infoPlugin;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -80,7 +80,10 @@ LastFmAccount::LastFmAccount( const QString& accountId )
|
|||||||
LastFmAccount::~LastFmAccount()
|
LastFmAccount::~LastFmAccount()
|
||||||
{
|
{
|
||||||
if ( m_infoPlugin )
|
if ( m_infoPlugin )
|
||||||
|
{
|
||||||
Tomahawk::InfoSystem::InfoSystem::instance()->removeInfoPlugin( infoPlugin() );
|
Tomahawk::InfoSystem::InfoSystem::instance()->removeInfoPlugin( infoPlugin() );
|
||||||
|
delete m_infoPlugin;
|
||||||
|
}
|
||||||
|
|
||||||
delete m_resolver.data();
|
delete m_resolver.data();
|
||||||
}
|
}
|
||||||
|
@@ -203,7 +203,6 @@ public:
|
|||||||
QPointer< QThread > workerThread() const;
|
QPointer< QThread > workerThread() const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
// InfoSystem takes ownership of InfoPlugins
|
|
||||||
void addInfoPlugin( Tomahawk::InfoSystem::InfoPluginPtr plugin );
|
void addInfoPlugin( Tomahawk::InfoSystem::InfoPluginPtr plugin );
|
||||||
void removeInfoPlugin( Tomahawk::InfoSystem::InfoPluginPtr plugin );
|
void removeInfoPlugin( Tomahawk::InfoSystem::InfoPluginPtr plugin );
|
||||||
|
|
||||||
|
@@ -184,7 +184,6 @@ InfoSystemWorker::removeInfoPlugin( Tomahawk::InfoSystem::InfoPluginPtr plugin )
|
|||||||
|
|
||||||
m_plugins.removeOne( plugin );
|
m_plugins.removeOne( plugin );
|
||||||
deregisterInfoTypes( plugin, plugin.data()->supportedGetTypes(), plugin.data()->supportedPushTypes() );
|
deregisterInfoTypes( plugin, plugin.data()->supportedGetTypes(), plugin.data()->supportedPushTypes() );
|
||||||
delete plugin.data();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user