mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-30 19:00:12 +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();
|
||||
|
||||
if ( !m_infoPlugin.isNull() )
|
||||
{
|
||||
Tomahawk::InfoSystem::InfoSystem::instance()->removeInfoPlugin( infoPlugin() );
|
||||
delete m_infoPlugin;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -80,7 +80,10 @@ LastFmAccount::LastFmAccount( const QString& accountId )
|
||||
LastFmAccount::~LastFmAccount()
|
||||
{
|
||||
if ( m_infoPlugin )
|
||||
{
|
||||
Tomahawk::InfoSystem::InfoSystem::instance()->removeInfoPlugin( infoPlugin() );
|
||||
delete m_infoPlugin;
|
||||
}
|
||||
|
||||
delete m_resolver.data();
|
||||
}
|
||||
|
@@ -203,7 +203,6 @@ public:
|
||||
QPointer< QThread > workerThread() const;
|
||||
|
||||
public slots:
|
||||
// InfoSystem takes ownership of InfoPlugins
|
||||
void addInfoPlugin( Tomahawk::InfoSystem::InfoPluginPtr plugin );
|
||||
void removeInfoPlugin( Tomahawk::InfoSystem::InfoPluginPtr plugin );
|
||||
|
||||
|
@@ -184,7 +184,6 @@ InfoSystemWorker::removeInfoPlugin( Tomahawk::InfoSystem::InfoPluginPtr plugin )
|
||||
|
||||
m_plugins.removeOne( plugin );
|
||||
deregisterInfoTypes( plugin, plugin.data()->supportedGetTypes(), plugin.data()->supportedPushTypes() );
|
||||
delete plugin.data();
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user