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

add more debug

This commit is contained in:
Jeff Mitchell
2011-05-03 13:41:24 -04:00
parent 8b2ce768d1
commit e615362672
2 changed files with 8 additions and 1 deletions

View File

@@ -85,6 +85,7 @@ lastfm::NetworkAccessManager::NetworkAccessManager( QObject* parent )
, m_monitor( 0 )
#endif
{
qDebug() << Q_FUNC_INFO << " begin";
// can't be done in above init, as applicationName() won't be set
if (lastfm::UserAgent.isEmpty())
{
@@ -93,6 +94,8 @@ lastfm::NetworkAccessManager::NetworkAccessManager( QObject* parent )
if (version.size()) version.prepend( ' ' );
lastfm::UserAgent = name + version + " (" + lastfm::platform() + ")";
}
qDebug() << Q_FUNC_INFO << " end, useragent is " << lastfm::UserAgent;
}

View File

@@ -196,16 +196,20 @@ lastfm::ws::parse( QNetworkReply* reply ) throw( ParseError )
QNetworkAccessManager*
lastfm::nam()
{
qDebug() << Q_FUNC_INFO << " begin";
QMutexLocker l( &namAccessMutex );
QThread* thread = QThread::currentThread();
qDebug() << Q_FUNC_INFO << " thread is " << thread;
if ( !threadNamHash.contains( thread ) )
{
qDebug() << Q_FUNC_INFO << " does not yet have a NAM, creating a new one";
NetworkAccessManager* newNam = new NetworkAccessManager();
threadNamHash[thread] = newNam;
ourNamHash[thread] = true;
qDebug() << Q_FUNC_INFO << " returning " << newNam;
return newNam;
}
qDebug() << Q_FUNC_INFO << " found a nam, is " << threadNamHash[thread];
return threadNamHash[thread];
}