mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-21 08:19:42 +01:00
* Remove more of the crazy amounts of debug output we've collected in the past few weeks.
This commit is contained in:
parent
0fab2a9836
commit
2f11b397dd
@ -341,7 +341,7 @@ Servent::readyRead()
|
||||
|
||||
foreach( ControlConnection* con, m_controlconnections )
|
||||
{
|
||||
qDebug() << "conid:" << con->id();
|
||||
// qDebug() << "conid:" << con->id();
|
||||
|
||||
if ( con->id() == controlid )
|
||||
{
|
||||
@ -660,10 +660,12 @@ Servent::claimOffer( ControlConnection* cc, const QString &nodeid, const QString
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
Servent::checkACL( const Connection* conn, const QString &nodeid, bool showDialog ) const
|
||||
{
|
||||
qDebug() << "Checking ACLs";
|
||||
|
||||
ACLSystem* aclSystem = ACLSystem::instance();
|
||||
ACLSystem::ACL peerStatus = aclSystem->isAuthorizedUser( nodeid );
|
||||
if( peerStatus == ACLSystem::Deny )
|
||||
@ -716,6 +718,7 @@ Servent::checkACL( const Connection* conn, const QString &nodeid, bool showDialo
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
QSharedPointer<QIODevice>
|
||||
Servent::remoteIODeviceFactory( const result_ptr& result )
|
||||
{
|
||||
@ -769,7 +772,7 @@ void
|
||||
Servent::printCurrentTransfers()
|
||||
{
|
||||
int k = 1;
|
||||
qDebug() << "~~~ Active file transfer connections:" << m_scsessions.length();
|
||||
// qDebug() << "~~~ Active file transfer connections:" << m_scsessions.length();
|
||||
foreach( StreamConnection* i, m_scsessions )
|
||||
{
|
||||
qDebug() << k << ") " << i->id();
|
||||
@ -806,10 +809,10 @@ bool
|
||||
Servent::connectedToSession( const QString& session )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
qDebug() << "Checking against " << session;
|
||||
qDebug() << "Checking against" << session;
|
||||
foreach( ControlConnection* cc, m_controlconnections )
|
||||
{
|
||||
qDebug() << "Checking session " << cc->id();
|
||||
qDebug() << "Checking session" << cc->id();
|
||||
if( cc->id() == session )
|
||||
return true;
|
||||
}
|
||||
@ -857,7 +860,7 @@ Servent::getIODeviceForUrl( const Tomahawk::result_ptr& result )
|
||||
|
||||
const QString proto = rx.cap( 1 );
|
||||
//const QString urlpart = rx.cap( 2 );
|
||||
qDebug() << "Getting IODevice for URL:" << proto << m_iofactories.contains( proto );
|
||||
// qDebug() << "Getting IODevice for URL:" << proto << m_iofactories.contains( proto );
|
||||
if ( !m_iofactories.contains( proto ) )
|
||||
return sp;
|
||||
return m_iofactories.value( proto )( result );
|
||||
|
@ -320,7 +320,7 @@ Pipeline::shunt( const query_ptr& q )
|
||||
|
||||
if ( thisResolver < m_resolvers.count() )
|
||||
{
|
||||
qDebug() << "Shunting in" << lasttimeout << "ms, q:" << q->toString();
|
||||
// qDebug() << "Shunting in" << lasttimeout << "ms, q:" << q->toString();
|
||||
|
||||
m_qidsTimeout.insert( q->id(), true );
|
||||
new FuncTimeout( lasttimeout, boost::bind( &Pipeline::timeoutShunt, this, q ), this );
|
||||
@ -361,9 +361,8 @@ Pipeline::setQIDState( const Tomahawk::query_ptr& query, int state )
|
||||
{
|
||||
// qDebug() << Q_FUNC_INFO << "removing" << query->id() << state;
|
||||
m_qidsState.remove( query->id() );
|
||||
qDebug() << "Queries running:" << m_qidsState.count();
|
||||
}
|
||||
|
||||
qDebug() << "Queries running:" << m_qidsState.count();
|
||||
}
|
||||
|
||||
|
||||
@ -381,7 +380,6 @@ Pipeline::incQIDState( const Tomahawk::query_ptr& query )
|
||||
// qDebug() << Q_FUNC_INFO << "inserting to qidsstate:" << query->id() << state;
|
||||
m_qidsState.insert( query->id(), state );
|
||||
|
||||
qDebug() << "Queries running:" << m_qidsState.count();
|
||||
return state;
|
||||
}
|
||||
|
||||
@ -404,8 +402,8 @@ Pipeline::decQIDState( const Tomahawk::query_ptr& query )
|
||||
{
|
||||
// qDebug() << Q_FUNC_INFO << "removing" << query->id() << state;
|
||||
m_qidsState.remove( query->id() );
|
||||
qDebug() << "Queries running:" << m_qidsState.count();
|
||||
}
|
||||
|
||||
qDebug() << "Queries running:" << m_qidsState.count();
|
||||
return state;
|
||||
}
|
||||
|
@ -451,7 +451,7 @@ QList< dyncontrol_ptr > DynamicPlaylist::variantsToControl( const QList< QVarian
|
||||
QList<dyncontrol_ptr> realControls;
|
||||
foreach( QVariantMap controlV, controlsV ) {
|
||||
dyncontrol_ptr control = GeneratorFactory::createControl( controlV.value( "type" ).toString(), controlV.value( "selectedType" ).toString() );
|
||||
qDebug() << "Creating control with data:" << controlV;
|
||||
// qDebug() << "Creating control with data:" << controlV;
|
||||
QJson::QObjectHelper::qvariant2qobject( controlV, control.data() );
|
||||
realControls << control;
|
||||
}
|
||||
|
@ -69,12 +69,12 @@ QtScriptResolver::resolve( const Tomahawk::query_ptr& query )
|
||||
{
|
||||
if ( QThread::currentThread() != thread() )
|
||||
{
|
||||
qDebug() << "Reinvoking in correct thread:" << Q_FUNC_INFO;
|
||||
// qDebug() << "Reinvoking in correct thread:" << Q_FUNC_INFO;
|
||||
QMetaObject::invokeMethod( this, "resolve", Qt::QueuedConnection, Q_ARG(Tomahawk::query_ptr, query) );
|
||||
return;
|
||||
}
|
||||
|
||||
qDebug() << Q_FUNC_INFO << query->toString();
|
||||
// qDebug() << Q_FUNC_INFO << query->toString();
|
||||
QString eval = QString( "resolve( '%1', '%2', '%3', '%4' );" )
|
||||
.arg( query->id().replace( "'", "\\'" ) )
|
||||
.arg( query->artist().replace( "'", "\\'" ) )
|
||||
@ -92,7 +92,6 @@ QtScriptResolver::resolve( const Tomahawk::query_ptr& query )
|
||||
foreach( const QVariant& rv, reslist )
|
||||
{
|
||||
QVariantMap m = rv.toMap();
|
||||
qDebug() << "RES" << m;
|
||||
|
||||
Tomahawk::result_ptr rp( new Tomahawk::Result() );
|
||||
Tomahawk::artist_ptr ap = Tomahawk::Artist::get( 0, m.value( "artist" ).toString() );
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include "album.h"
|
||||
#include "pipeline.h"
|
||||
#include "sourcelist.h"
|
||||
#include "functimeout.h"
|
||||
#include "utils/tomahawkutils.h"
|
||||
|
||||
|
||||
@ -65,14 +64,15 @@ ScriptResolver::readStderr()
|
||||
void
|
||||
ScriptResolver::readStdout()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << m_proc.bytesAvailable();
|
||||
// qDebug() << Q_FUNC_INFO << m_proc.bytesAvailable();
|
||||
|
||||
if( m_msgsize == 0 )
|
||||
{
|
||||
if( m_proc.bytesAvailable() < 4 ) return;
|
||||
quint32 len_nbo;
|
||||
m_proc.read( (char*) &len_nbo, 4 );
|
||||
m_msgsize = qFromBigEndian( len_nbo );
|
||||
qDebug() << Q_FUNC_INFO << "msgsize" << m_msgsize;
|
||||
// qDebug() << Q_FUNC_INFO << "msgsize" << m_msgsize;
|
||||
}
|
||||
|
||||
if( m_msgsize > 0 )
|
||||
@ -108,6 +108,7 @@ void
|
||||
ScriptResolver::handleMsg( const QByteArray& msg )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << msg.size() << QString::fromAscii( msg );
|
||||
|
||||
bool ok;
|
||||
QVariant v = m_parser.parse( msg, &ok );
|
||||
if( !ok || v.type() != QVariant::Map )
|
||||
@ -122,7 +123,9 @@ ScriptResolver::handleMsg( const QByteArray& msg )
|
||||
{
|
||||
doSetup( m );
|
||||
return;
|
||||
} else if( msgtype == "confwidget" ) {
|
||||
}
|
||||
else if( msgtype == "confwidget" )
|
||||
{
|
||||
setupConfWidget( m );
|
||||
return;
|
||||
}
|
||||
@ -130,21 +133,13 @@ ScriptResolver::handleMsg( const QByteArray& msg )
|
||||
if( msgtype == "results" )
|
||||
{
|
||||
const QString qid = m.value( "qid" ).toString();
|
||||
if ( !m_queryState.contains( qid ) )
|
||||
{
|
||||
//FIXME: We should always accept results, even if they arrive too late. Needs some work in Pipeline.
|
||||
qDebug() << "Ignoring results for" << qid << "- arrived after timeout.";
|
||||
return;
|
||||
}
|
||||
m_queryState.remove( qid );
|
||||
|
||||
QList< Tomahawk::result_ptr > results;
|
||||
const QVariantList reslist = m.value( "results" ).toList();
|
||||
|
||||
foreach( const QVariant& rv, reslist )
|
||||
{
|
||||
QVariantMap m = rv.toMap();
|
||||
qDebug() << "RES" << m;
|
||||
qDebug() << "Found result:" << m;
|
||||
|
||||
Tomahawk::result_ptr rp( new Tomahawk::Result() );
|
||||
Tomahawk::artist_ptr ap = Tomahawk::Artist::get( 0, m.value( "artist" ).toString() );
|
||||
@ -220,9 +215,6 @@ ScriptResolver::resolve( const Tomahawk::query_ptr& query )
|
||||
const QByteArray msg = m_serializer.serialize( QVariant( m ) );
|
||||
qDebug() << "ASKING SCRIPT RESOLVER TO RESOLVE:" << msg;
|
||||
sendMsg( msg );
|
||||
|
||||
m_queryState.insert( query->id(), 1 );
|
||||
new Tomahawk::FuncTimeout( m_timeout, boost::bind( &ScriptResolver::onTimeout, this, query ), this );
|
||||
}
|
||||
|
||||
|
||||
@ -291,17 +283,3 @@ ScriptResolver::stop()
|
||||
qDebug() << "KILLING PROCESS!";
|
||||
m_proc.kill();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ScriptResolver::onTimeout( const Tomahawk::query_ptr& query )
|
||||
{
|
||||
// check if this query has already been processed
|
||||
if ( !m_queryState.contains( query->id() ) )
|
||||
return;
|
||||
|
||||
// if not, it's time to emit an empty result list
|
||||
m_queryState.remove( query->id() );
|
||||
QList< Tomahawk::result_ptr > results;
|
||||
Tomahawk::Pipeline::instance()->reportResults( query->id(), results );
|
||||
}
|
||||
|
@ -58,8 +58,6 @@ private slots:
|
||||
void readStdout();
|
||||
void cmdExited( int code, QProcess::ExitStatus status );
|
||||
|
||||
void onTimeout( const Tomahawk::query_ptr& query );
|
||||
|
||||
private:
|
||||
void handleMsg( const QByteArray& msg );
|
||||
void sendMsg( const QByteArray& msg );
|
||||
@ -76,8 +74,6 @@ private:
|
||||
|
||||
bool m_ready, m_stopped;
|
||||
|
||||
QHash< QString /* QID */, unsigned int /* state */ > m_queryState;
|
||||
|
||||
QJson::Parser m_parser;
|
||||
QJson::Serializer m_serializer;
|
||||
};
|
||||
|
@ -38,7 +38,7 @@ void AvatarManager::onNewConnection()
|
||||
|
||||
void AvatarManager::fetchVCard(const QString &jid)
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
// qDebug() << Q_FUNC_INFO;
|
||||
|
||||
Jreen::IQ iq(Jreen::IQ::Get, jid );
|
||||
iq.addExtension(new Jreen::VCard());
|
||||
@ -50,15 +50,15 @@ void AvatarManager::onNewPresence(const Jreen::Presence& presence)
|
||||
Jreen::VCardUpdate::Ptr update = presence.findExtension<Jreen::VCardUpdate>();
|
||||
if(update)
|
||||
{
|
||||
qDebug() << "vcard: found update for " << presence.from().full();
|
||||
// qDebug() << "vcard: found update for" << presence.from().full();
|
||||
if(!isCached(update->photoHash()))
|
||||
{
|
||||
qDebug() << presence.from().full() << "vcard: photo not cached, starting request..." << update->photoHash();
|
||||
// qDebug() << presence.from().full() << "vcard: photo not cached, starting request..." << update->photoHash();
|
||||
fetchVCard( presence.from().bare() );
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug() << presence.from().full() << "vcard: photo already cached no request necessary " << update->photoHash();
|
||||
// qDebug() << presence.from().full() << "vcard: photo already cached no request necessary " << update->photoHash();
|
||||
m_JidsAvatarHashes.insert( update->photoHash(), presence.from().bare() );
|
||||
|
||||
Q_ASSERT(!this->avatar(presence.from().bare()).isNull());
|
||||
@ -67,7 +67,7 @@ void AvatarManager::onNewPresence(const Jreen::Presence& presence)
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << presence.from().full() << "got no statusupdateextension";
|
||||
// qDebug() << Q_FUNC_INFO << presence.from().full() << "got no statusupdateextension";
|
||||
|
||||
//TODO: do we want this? might fetch avatars for broken clients
|
||||
fetchVCard( presence.from().bare() );
|
||||
|
@ -621,8 +621,7 @@ void JabberPlugin::onPresenceReceived( const Jreen::RosterItem::Ptr &item, const
|
||||
Jreen::JID jid = presence.from();
|
||||
QString fulljid( jid.full() );
|
||||
|
||||
|
||||
qDebug() << Q_FUNC_INFO << "* New presence:" << fulljid << presence.subtype();
|
||||
// qDebug() << Q_FUNC_INFO << "* New presence:" << fulljid << presence.subtype();
|
||||
|
||||
if( jid == m_client->jid() )
|
||||
return;
|
||||
@ -656,7 +655,7 @@ void JabberPlugin::onPresenceReceived( const Jreen::RosterItem::Ptr &item, const
|
||||
}
|
||||
else if( !caps )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << "Running tomahawk: no" << "no caps";
|
||||
// qDebug() << Q_FUNC_INFO << "Running tomahawk: no" << "no caps";
|
||||
}
|
||||
}
|
||||
|
||||
@ -665,7 +664,7 @@ void JabberPlugin::onSubscriptionReceived(const Jreen::RosterItem::Ptr& item, co
|
||||
if ( m_state != Connected )
|
||||
return;
|
||||
|
||||
qDebug() << Q_FUNC_INFO << "presence type:" << presence.subtype();
|
||||
// qDebug() << Q_FUNC_INFO << "presence type:" << presence.subtype();
|
||||
if(item)
|
||||
qDebug() << Q_FUNC_INFO << presence.from().full() << "subs" << item->subscription() << "ask" << item->ask();
|
||||
else
|
||||
@ -772,7 +771,7 @@ void JabberPlugin::onNewIq(const Jreen::IQ& iq, int context)
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << jid.full() << "Running tomahawk/feature enabled: no";
|
||||
// qDebug() << Q_FUNC_INFO << jid.full() << "Running tomahawk/feature enabled: no";
|
||||
|
||||
//LEGACY: accept resources starting with tomahawk too
|
||||
if( jid.resource().startsWith("tomahawk") )
|
||||
|
@ -146,7 +146,7 @@ CollectionItem::playlistsAddedInternal( SourceTreeItem* parent, const QList< dyn
|
||||
foreach( const dynplaylist_ptr& p, playlists )
|
||||
{
|
||||
DynamicPlaylistItem* plItem = new DynamicPlaylistItem( model(), parent, p, parent->children().count() - addOffset );
|
||||
qDebug() << "Dynamic Playlist added:" << p->title() << p->creator() << p->info();
|
||||
// qDebug() << "Dynamic Playlist added:" << p->title() << p->creator() << p->info();
|
||||
p->loadRevision();
|
||||
items << plItem;
|
||||
}
|
||||
@ -200,7 +200,7 @@ CollectionItem::onPlaylistsAdded( const QList< playlist_ptr >& playlists )
|
||||
foreach( const playlist_ptr& p, playlists )
|
||||
{
|
||||
PlaylistItem* plItem = new PlaylistItem( model(), m_playlists, p, m_playlists->children().count() - addOffset );
|
||||
qDebug() << "Playlist added:" << p->title() << p->creator() << p->info();
|
||||
// qDebug() << "Playlist added:" << p->title() << p->creator() << p->info();
|
||||
p->loadRevision();
|
||||
items << plItem;
|
||||
}
|
||||
|
@ -251,9 +251,11 @@ DynamicPlaylistItem::checkReparentHackNeeded( const DynamicPlaylistRevision& rev
|
||||
// HACK HACK HACK workaround for an ugly hack where we have to be compatible with older tomahawks (pre-0.1.0) that created dynplaylists as OnDemand then changed them to Static if they were static.
|
||||
// we need to reparent this playlist to the correct category :-/.
|
||||
CategoryItem* cat = qobject_cast< CategoryItem* >( parent() );
|
||||
qDebug() << "with category" << cat;
|
||||
if( cat ) qDebug() << "and cat type:" << cat->categoryType();
|
||||
if( cat ) {
|
||||
|
||||
// qDebug() << "with category" << cat;
|
||||
// if( cat ) qDebug() << "and cat type:" << cat->categoryType();
|
||||
if( cat )
|
||||
{
|
||||
CategoryItem* from = cat;
|
||||
CategoryItem* to = 0;
|
||||
if( cat->categoryType() == SourcesModel::PlaylistsCategory && revision.mode == OnDemand ) { // WRONG
|
||||
@ -270,7 +272,7 @@ DynamicPlaylistItem::checkReparentHackNeeded( const DynamicPlaylistRevision& rev
|
||||
} else if( cat->categoryType() == SourcesModel::StationsCategory && revision.mode == Static ) { // WRONG
|
||||
CollectionItem* col = qobject_cast< CollectionItem* >( cat->parent() );
|
||||
to = col->playlistsCategory();
|
||||
qDebug() << "TRYING TO HACK TO:" << to;
|
||||
// qDebug() << "TRYING TO HACK TO:" << to;
|
||||
if( !to ) { // you have got to be fucking kidding me
|
||||
int fme = col->children().count();
|
||||
col->beginRowsAdded( fme, fme );
|
||||
@ -281,7 +283,7 @@ DynamicPlaylistItem::checkReparentHackNeeded( const DynamicPlaylistRevision& rev
|
||||
}
|
||||
}
|
||||
if( to ) {
|
||||
qDebug() << "HACKING! moving dynamic playlist from" << from->text() << "to:" << to->text();
|
||||
// qDebug() << "HACKING! moving dynamic playlist from" << from->text() << "to:" << to->text();
|
||||
// remove and add
|
||||
int idx = from->children().indexOf( this );
|
||||
from->beginRowsRemoved( idx, idx );
|
||||
|
Loading…
x
Reference in New Issue
Block a user