mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-22 08:52:12 +02:00
Don't let the InfoSystem take over ownership of info plugins
This commit is contained in:
parent
f7f4901bbe
commit
dfbd7660d0
src
accounts/xmpp/sip
libtomahawk
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user