mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-07 06:36:55 +02:00
Clear status on Tomahawk startup since we can't currently clear it on
shutdown
This commit is contained in:
@@ -44,6 +44,10 @@ Tomahawk::InfoSystem::XmppInfoPlugin::XmppInfoPlugin(XmppSipPlugin* sipPlugin)
|
|||||||
m_pubSubManager = new Jreen::PubSub::Manager( sipPlugin->m_client );
|
m_pubSubManager = new Jreen::PubSub::Manager( sipPlugin->m_client );
|
||||||
m_pubSubManager->addEntityType< Jreen::Tune >();
|
m_pubSubManager->addEntityType< Jreen::Tune >();
|
||||||
|
|
||||||
|
// Clear status
|
||||||
|
Jreen::Tune::Ptr tune( new Jreen::Tune() );
|
||||||
|
m_pubSubManager->publishItems(QList<Jreen::Payload::Ptr>() << tune, Jreen::JID());
|
||||||
|
|
||||||
m_pauseTimer.setSingleShot( true );
|
m_pauseTimer.setSingleShot( true );
|
||||||
connect( &m_pauseTimer, SIGNAL( timeout() ),
|
connect( &m_pauseTimer, SIGNAL( timeout() ),
|
||||||
this, SLOT( audioStopped() ) );
|
this, SLOT( audioStopped() ) );
|
||||||
@@ -52,7 +56,10 @@ Tomahawk::InfoSystem::XmppInfoPlugin::XmppInfoPlugin(XmppSipPlugin* sipPlugin)
|
|||||||
|
|
||||||
Tomahawk::InfoSystem::XmppInfoPlugin::~XmppInfoPlugin()
|
Tomahawk::InfoSystem::XmppInfoPlugin::~XmppInfoPlugin()
|
||||||
{
|
{
|
||||||
delete m_pubSubManager;
|
//Note: the next two lines don't currently work, because the deletion wipes out internally posted events, need to talk to euro about a fix
|
||||||
|
Jreen::Tune::Ptr tune( new Jreen::Tune() );
|
||||||
|
m_pubSubManager->publishItems(QList<Jreen::Payload::Ptr>() << tune, Jreen::JID());
|
||||||
|
m_pubSubManager->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user