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

Make infosystem less verbose

This commit is contained in:
Uwe L. Korn
2014-05-07 20:46:14 +01:00
parent a937b99c3b
commit da8e2a2126
4 changed files with 8 additions and 14 deletions

View File

@@ -108,8 +108,6 @@ InfoSystem::InfoSystem( QObject* parent )
{ {
s_instance = this; s_instance = this;
qDebug() << Q_FUNC_INFO;
m_infoSystemCacheThreadController = new InfoSystemCacheThread( this ); m_infoSystemCacheThreadController = new InfoSystemCacheThread( this );
m_infoSystemCacheThreadController->start( QThread::IdlePriority ); m_infoSystemCacheThreadController->start( QThread::IdlePriority );
@@ -150,7 +148,6 @@ InfoSystem::~InfoSystem()
void void
InfoSystem::init() InfoSystem::init()
{ {
// tDebug() << Q_FUNC_INFO;
if ( m_inited ) if ( m_inited )
return; return;
@@ -191,7 +188,6 @@ InfoSystem::init()
bool bool
InfoSystem::getInfo( const InfoRequestData& requestData ) InfoSystem::getInfo( const InfoRequestData& requestData )
{ {
//qDebug() << Q_FUNC_INFO;
if ( !m_inited || !m_infoSystemWorkerThreadController->worker() ) if ( !m_inited || !m_infoSystemWorkerThreadController->worker() )
{ {
init(); init();
@@ -228,7 +224,7 @@ InfoSystem::getInfo( const QString& caller, const QVariantMap& customData, const
bool bool
InfoSystem::pushInfo( InfoPushData pushData ) InfoSystem::pushInfo( InfoPushData pushData )
{ {
tDebug() << Q_FUNC_INFO << "type is" << pushData.type; tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "type is" << pushData.type;
if ( !m_inited || !m_infoSystemWorkerThreadController->worker() ) if ( !m_inited || !m_infoSystemWorkerThreadController->worker() )
{ {
init(); init();
@@ -286,7 +282,7 @@ InfoSystem::addInfoPlugin( Tomahawk::InfoSystem::InfoPluginPtr plugin )
return; return;
} }
tDebug() << Q_FUNC_INFO << plugin.data(); tDebug( LOGVERBOSE ) << Q_FUNC_INFO << plugin.data();
QMetaObject::invokeMethod( m_infoSystemWorkerThreadController->worker(), "addInfoPlugin", Qt::QueuedConnection, Q_ARG( Tomahawk::InfoSystem::InfoPluginPtr, plugin ) ); QMetaObject::invokeMethod( m_infoSystemWorkerThreadController->worker(), "addInfoPlugin", Qt::QueuedConnection, Q_ARG( Tomahawk::InfoSystem::InfoPluginPtr, plugin ) );
} }
@@ -313,7 +309,7 @@ InfoSystem::removeInfoPlugin( Tomahawk::InfoSystem::InfoPluginPtr plugin )
return; return;
} }
tDebug() << Q_FUNC_INFO << plugin.data(); tDebug( LOGVERBOSE ) << Q_FUNC_INFO << plugin.data();
QMetaObject::invokeMethod( m_infoSystemWorkerThreadController->worker(), "removeInfoPlugin", Qt::QueuedConnection, Q_ARG( Tomahawk::InfoSystem::InfoPluginPtr, plugin ) ); QMetaObject::invokeMethod( m_infoSystemWorkerThreadController->worker(), "removeInfoPlugin", Qt::QueuedConnection, Q_ARG( Tomahawk::InfoSystem::InfoPluginPtr, plugin ) );
} }

View File

@@ -192,7 +192,6 @@ InfoSystemCache::notInCache( QObject *receiver, Tomahawk::InfoSystem::InfoString
void void
InfoSystemCache::updateCacheSlot( Tomahawk::InfoSystem::InfoStringHash criteria, qint64 maxAge, Tomahawk::InfoSystem::InfoType type, QVariant output ) InfoSystemCache::updateCacheSlot( Tomahawk::InfoSystem::InfoStringHash criteria, qint64 maxAge, Tomahawk::InfoSystem::InfoType type, QVariant output )
{ {
//qDebug() << Q_FUNC_INFO;
const QString criteriaHashVal = criteriaMd5( criteria ); const QString criteriaHashVal = criteriaMd5( criteria );
const QString criteriaHashValWithType = criteriaMd5( criteria, type ); const QString criteriaHashValWithType = criteriaMd5( criteria, type );
const QString cacheDir = m_cacheBaseDir + QString::number( (int)type ); const QString cacheDir = m_cacheBaseDir + QString::number( (int)type );

View File

@@ -282,7 +282,7 @@ InfoSystemWorker::getInfo( Tomahawk::InfoSystem::InfoRequestData requestData )
void void
InfoSystemWorker::pushInfo( Tomahawk::InfoSystem::InfoPushData pushData ) InfoSystemWorker::pushInfo( Tomahawk::InfoSystem::InfoPushData pushData )
{ {
tDebug() << Q_FUNC_INFO << "type is " << pushData.type; tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "type is " << pushData.type;
if ( pushData.pushFlags != PushNoFlag ) if ( pushData.pushFlags != PushNoFlag )
{ {
@@ -294,7 +294,7 @@ InfoSystemWorker::pushInfo( Tomahawk::InfoSystem::InfoPushData pushData )
} }
} }
tDebug() << Q_FUNC_INFO << "number of matching plugins: " << m_infoPushMap[ pushData.type ].size(); tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "number of matching plugins: " << m_infoPushMap[ pushData.type ].size();
Q_FOREACH( InfoPluginPtr ptr, m_infoPushMap[ pushData.type ] ) Q_FOREACH( InfoPluginPtr ptr, m_infoPushMap[ pushData.type ] )
{ {
@@ -307,7 +307,7 @@ InfoSystemWorker::pushInfo( Tomahawk::InfoSystem::InfoPushData pushData )
void void
InfoSystemWorker::getShortUrl( Tomahawk::InfoSystem::InfoPushData pushData ) InfoSystemWorker::getShortUrl( Tomahawk::InfoSystem::InfoPushData pushData )
{ {
tDebug() << Q_FUNC_INFO << "type is " << pushData.type; tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "type is " << pushData.type;
if ( !pushData.infoPair.second.canConvert< Tomahawk::InfoSystem::InfoStringHash >() ) if ( !pushData.infoPair.second.canConvert< Tomahawk::InfoSystem::InfoStringHash >() )
{ {
QMetaObject::invokeMethod( this, "pushInfo", Qt::QueuedConnection, Q_ARG( Tomahawk::InfoSystem::InfoPushData, pushData ) ); QMetaObject::invokeMethod( this, "pushInfo", Qt::QueuedConnection, Q_ARG( Tomahawk::InfoSystem::InfoPushData, pushData ) );
@@ -344,7 +344,7 @@ InfoSystemWorker::getShortUrl( Tomahawk::InfoSystem::InfoPushData pushData )
void void
InfoSystemWorker::shortLinkReady( QUrl longUrl, QUrl shortUrl, QVariant callbackObj ) InfoSystemWorker::shortLinkReady( QUrl longUrl, QUrl shortUrl, QVariant callbackObj )
{ {
tDebug() << Q_FUNC_INFO << "long url = " << longUrl << ", shortUrl = " << shortUrl; tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "long url = " << longUrl << ", shortUrl = " << shortUrl;
m_shortLinksWaiting--; m_shortLinksWaiting--;
if ( !m_shortLinksWaiting ) if ( !m_shortLinksWaiting )
disconnect( GlobalActionManager::instance(), SIGNAL( shortLinkReady( QUrl, QUrl, QVariant ) ) ); disconnect( GlobalActionManager::instance(), SIGNAL( shortLinkReady( QUrl, QUrl, QVariant ) ) );
@@ -364,7 +364,7 @@ InfoSystemWorker::shortLinkReady( QUrl longUrl, QUrl shortUrl, QVariant callback
pushData.infoPair.first = flagProps; pushData.infoPair.first = flagProps;
} }
tDebug() << Q_FUNC_INFO << "pushInfoPair first is: " << pushData.infoPair.first.keys(); tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "pushInfoPair first is: " << pushData.infoPair.first.keys();
QMetaObject::invokeMethod( this, "pushInfo", Qt::QueuedConnection, Q_ARG( Tomahawk::InfoSystem::InfoPushData, pushData ) ); QMetaObject::invokeMethod( this, "pushInfo", Qt::QueuedConnection, Q_ARG( Tomahawk::InfoSystem::InfoPushData, pushData ) );
} }

View File

@@ -229,7 +229,6 @@ JSResolver::init()
QDir cryptojs( RESPATH "js/cryptojs" ); QDir cryptojs( RESPATH "js/cryptojs" );
foreach ( QString jsfile, cryptojs.entryList( jsfiles ) ) foreach ( QString jsfile, cryptojs.entryList( jsfiles ) )
{ {
qWarning() << Q_FUNC_INFO << ( RESPATH "js/cryptojs/" + jsfile );
d->engine->setScriptPath( RESPATH "js/cryptojs/" + jsfile ); d->engine->setScriptPath( RESPATH "js/cryptojs/" + jsfile );
QFile jslib( RESPATH "js/cryptojs/" + jsfile ); QFile jslib( RESPATH "js/cryptojs/" + jsfile );
jslib.open( QIODevice::ReadOnly ); jslib.open( QIODevice::ReadOnly );