1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-07 01:22:49 +02:00

Move signal connections of scrobbler into scrobbler, easier to read.

This commit is contained in:
Alejandro Wainzinger 2011-04-10 16:46:35 -07:00
parent 5ae0a7138c
commit 252a48196c
2 changed files with 13 additions and 12 deletions

@ -43,6 +43,18 @@ Scrobbler::Scrobbler( QObject* parent )
SLOT( infoSystemInfo( QString, Tomahawk::InfoSystem::InfoType, QVariant, QVariant, Tomahawk::InfoSystem::InfoCustomData ) ) );
connect( TomahawkApp::instance()->infoSystem(), SIGNAL( finished( QString ) ), SLOT( infoSystemFinished( QString ) ) );
connect( AudioEngine::instance(), SIGNAL( started( const Tomahawk::result_ptr& ) ),
SLOT( trackStarted( const Tomahawk::result_ptr& ) ), Qt::QueuedConnection );
connect( AudioEngine::instance(), SIGNAL( paused() ),
SLOT( trackPaused() ), Qt::QueuedConnection );
connect( AudioEngine::instance(), SIGNAL( resumed() ),
SLOT( trackResumed() ), Qt::QueuedConnection );
connect( AudioEngine::instance(), SIGNAL( stopped() ),
SLOT( trackStopped() ), Qt::QueuedConnection );
}
@ -143,4 +155,4 @@ Scrobbler::infoSystemFinished( QString target )
qDebug() << Q_FUNC_INFO;
qDebug() << "Scrobbler received done signal from InfoSystem";
}
}
}

@ -225,17 +225,6 @@ TomahawkApp::init()
qDebug() << "Setting NAM.";
TomahawkUtils::setNam( new lastfm::NetworkAccessManager( this ) );
connect( m_audioEngine, SIGNAL( started( const Tomahawk::result_ptr& ) ),
m_scrobbler, SLOT( trackStarted( const Tomahawk::result_ptr& ) ), Qt::QueuedConnection );
connect( m_audioEngine, SIGNAL( paused() ),
m_scrobbler, SLOT( trackPaused() ), Qt::QueuedConnection );
connect( m_audioEngine, SIGNAL( resumed() ),
m_scrobbler, SLOT( trackResumed() ), Qt::QueuedConnection );
connect( m_audioEngine, SIGNAL( stopped() ),
m_scrobbler, SLOT( trackStopped() ), Qt::QueuedConnection );
#else
qDebug() << "Setting NAM.";
TomahawkUtils::setNam( new QNetworkAccessManager );