1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 06:07:37 +02:00

* InfoSystem now emits ready() when init is done.

This commit is contained in:
Christian Muehlhaeuser
2013-06-07 11:54:48 +02:00
parent 9e89e4aa4c
commit 13ae09218d
3 changed files with 26 additions and 20 deletions

View File

@@ -80,6 +80,7 @@ InfoPlugin::setFriendlyName( const QString& friendlyName )
m_friendlyName = friendlyName;
}
const QString
InfoPlugin::friendlyName() const
{
@@ -182,6 +183,7 @@ InfoSystem::init()
QMetaObject::invokeMethod( worker, "init", Qt::QueuedConnection, Q_ARG( Tomahawk::InfoSystem::InfoSystemCache*, cache ) );
m_inited = true;
emit ready();
}
@@ -211,7 +213,7 @@ InfoSystem::getInfo( const QString &caller, const QVariantMap &customData, const
requestData.caller = caller;
requestData.customData = customData;
requestData.allSources = allSources;
Q_FOREACH( InfoType type, inputMap.keys() )
foreach ( InfoType type, inputMap.keys() )
{
requestData.type = type;
requestData.input = inputMap[ type ];
@@ -249,7 +251,7 @@ InfoSystem::pushInfo( const QString &caller, const InfoTypeMap &input, const Pus
return false;
}
Q_FOREACH( InfoType type, input.keys() )
foreach ( InfoType type, input.keys() )
{
InfoPushData pushData( caller, type, input[ type ], pushFlags );
pushData.infoPair = PushInfoPair( QVariantMap(), pushData.input );
@@ -379,11 +381,13 @@ InfoSystemWorkerThread::InfoSystemWorkerThread( QObject *parent )
tDebug() << Q_FUNC_INFO;
}
InfoSystemWorkerThread::~InfoSystemWorkerThread()
{
tDebug() << Q_FUNC_INFO;
}
void
InfoSystemWorkerThread::InfoSystemWorkerThread::run()
{
@@ -393,6 +397,7 @@ InfoSystemWorkerThread::InfoSystemWorkerThread::run()
delete m_worker.data();
}
InfoSystemWorker*
InfoSystemWorkerThread::worker() const
{
@@ -401,7 +406,6 @@ InfoSystemWorkerThread::worker() const
return m_worker.data();
}
} //namespace InfoSystem
} //namespace Tomahawk

View File

@@ -214,6 +214,7 @@ signals:
void info( Tomahawk::InfoSystem::InfoRequestData requestData, QVariant output );
void finished( QString target );
void finished( QString target, Tomahawk::InfoSystem::InfoType type );
void ready();
void updatedSupportedGetTypes( Tomahawk::InfoSystem::InfoTypeSet supportedTypes );
void updatedSupportedPushTypes( Tomahawk::InfoSystem::InfoTypeSet supportedTypes );

View File

@@ -43,6 +43,7 @@ namespace InfoSystem
InfoSystemWorker::InfoSystemWorker()
: QObject()
, m_cache( 0 )
{
tDebug() << Q_FUNC_INFO;