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:
@@ -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
|
||||
|
@@ -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 );
|
||||
|
@@ -43,6 +43,7 @@ namespace InfoSystem
|
||||
|
||||
InfoSystemWorker::InfoSystemWorker()
|
||||
: QObject()
|
||||
, m_cache( 0 )
|
||||
{
|
||||
tDebug() << Q_FUNC_INFO;
|
||||
|
||||
|
Reference in New Issue
Block a user