mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-13 04:21:51 +02:00
* Cleaned up debug output, lots.
This commit is contained in:
parent
f78df2c087
commit
3ba36fc38e
@ -6,6 +6,8 @@ Version 0.0.3:
|
||||
speeds up importing sources a lot.
|
||||
* Faster painting of playlists with lots of unresolved tracks.
|
||||
* The tomahawk:// protocol handler works on Windows now.
|
||||
* Fixed launching Tomahawk from Installer with administrative permissions.
|
||||
* Prefer local results when results' score is equal.
|
||||
|
||||
Version 0.0.2:
|
||||
* Don't reconnect to Jabber if the settings dialog is closed successfully
|
||||
|
@ -52,9 +52,9 @@ DatabaseCommand_LoadDynamicPlaylist::exec( DatabaseImpl* dbi )
|
||||
QList< QVariantMap > controls;
|
||||
QString playlist_guid;
|
||||
qDebug() << "Loading controls..." << revisionGuid();
|
||||
qDebug() << "SELECT playlist_revision.playlist, controls, plmode, pltype "
|
||||
"FROM dynamic_playlist_revision, playlist_revision "
|
||||
"WHERE dynamic_playlist_revision.guid = "<< revisionGuid() << " AND playlist_revision.guid = dynamic_playlist_revision.guid";
|
||||
// qDebug() << "SELECT playlist_revision.playlist, controls, plmode, pltype "
|
||||
// "FROM dynamic_playlist_revision, playlist_revision "
|
||||
// "WHERE dynamic_playlist_revision.guid = "<< revisionGuid() << " AND playlist_revision.guid = dynamic_playlist_revision.guid";
|
||||
if( controlsQuery.first() )
|
||||
{
|
||||
playlist_guid = controlsQuery.value( 0 ).toString();
|
||||
|
@ -45,7 +45,7 @@ DatabaseCommand_LoadPlaylistEntries::generateEntries( DatabaseImpl* dbi )
|
||||
query_entries.bindValue( ":guid", m_revguid );
|
||||
query_entries.exec();
|
||||
|
||||
qDebug() << "trying to load entries:" << m_revguid;
|
||||
// qDebug() << "trying to load entries:" << m_revguid;
|
||||
QString prevrev;
|
||||
QJson::Parser parser; bool ok;
|
||||
|
||||
@ -55,7 +55,6 @@ DatabaseCommand_LoadPlaylistEntries::generateEntries( DatabaseImpl* dbi )
|
||||
QVariant v = parser.parse( query_entries.value(0).toByteArray(), &ok );
|
||||
Q_ASSERT( ok && v.type() == QVariant::List ); //TODO
|
||||
m_guids = v.toStringList();
|
||||
// qDebug() << "Entries:" << guids;
|
||||
|
||||
QString inclause = QString("('%1')").arg(m_guids.join("', '"));
|
||||
|
||||
@ -115,5 +114,5 @@ DatabaseCommand_LoadPlaylistEntries::generateEntries( DatabaseImpl* dbi )
|
||||
m_islatest = query_entries_old.value( 1 ).toBool();
|
||||
}
|
||||
|
||||
qDebug() << Q_FUNC_INFO << "entrymap:" << m_entrymap;
|
||||
// qDebug() << Q_FUNC_INFO << "entrymap:" << m_entrymap;
|
||||
}
|
||||
|
@ -62,16 +62,12 @@ Connection::Connection( Servent* parent )
|
||||
|
||||
Connection::~Connection()
|
||||
{
|
||||
qDebug() << "DTOR connection (super)" << id() << thread();
|
||||
qDebug() << "DTOR connection (super)" << id() << thread() << m_sock.isNull();
|
||||
if( !m_sock.isNull() )
|
||||
{
|
||||
qDebug() << "deleteLatering sock" << m_sock;
|
||||
// qDebug() << "deleteLatering sock" << m_sock;
|
||||
m_sock->deleteLater();
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug() << "no valid sock to delete";
|
||||
}
|
||||
|
||||
delete m_statstimer;
|
||||
}
|
||||
@ -118,7 +114,7 @@ Connection::setFirstMessage( msg_ptr m )
|
||||
void
|
||||
Connection::shutdown( bool waitUntilSentAll )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << waitUntilSentAll;
|
||||
qDebug() << Q_FUNC_INFO << waitUntilSentAll << id();
|
||||
if ( m_do_shutdown )
|
||||
{
|
||||
//qDebug() << id() << " already shutting down";
|
||||
@ -128,7 +124,7 @@ Connection::shutdown( bool waitUntilSentAll )
|
||||
m_do_shutdown = true;
|
||||
if ( !waitUntilSentAll )
|
||||
{
|
||||
qDebug() << "Shutting down immediately " << id();
|
||||
// qDebug() << "Shutting down immediately " << id();
|
||||
actualShutdown();
|
||||
}
|
||||
else
|
||||
@ -146,10 +142,9 @@ Connection::shutdown( bool waitUntilSentAll )
|
||||
void
|
||||
Connection::actualShutdown()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
qDebug() << Q_FUNC_INFO << m_actually_shutting_down << id();
|
||||
if( m_actually_shutting_down )
|
||||
{
|
||||
qDebug() << "(already actually shutting down)";
|
||||
return;
|
||||
}
|
||||
m_actually_shutting_down = true;
|
||||
@ -159,7 +154,7 @@ Connection::actualShutdown()
|
||||
m_sock->disconnectFromHost();
|
||||
}
|
||||
|
||||
qDebug() << "EMITTING finished()";
|
||||
// qDebug() << "EMITTING finished()";
|
||||
emit finished();
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ DBSyncConnection::~DBSyncConnection()
|
||||
void
|
||||
DBSyncConnection::idleTimeout()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << "*************";
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
shutdown( true );
|
||||
}
|
||||
|
||||
@ -87,11 +87,6 @@ DBSyncConnection::changeState( State newstate )
|
||||
m_state = newstate;
|
||||
qDebug() << "DBSYNC State changed from" << s << "to" << newstate;
|
||||
emit stateChanged( newstate, s, "" );
|
||||
|
||||
if ( newstate == SYNCED )
|
||||
{
|
||||
qDebug() << "Synced :)";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -197,7 +192,7 @@ DBSyncConnection::handleMsg( msg_ptr msg )
|
||||
msg->is( Msg::DBOP ) &&
|
||||
msg->payload() == "ok" )
|
||||
{
|
||||
qDebug() << "No ops to apply, we are synced.";
|
||||
// qDebug() << "No ops to apply, we are synced.";
|
||||
changeState( SYNCED );
|
||||
// calc the collection stats, to updates the "X tracks" in the sidebar etc
|
||||
// this is done automatically if you run a dbcmd to add files.
|
||||
|
@ -102,7 +102,7 @@ Pipeline::resolve( const QList<query_ptr>& qlist, bool prioritized )
|
||||
int i = 0;
|
||||
foreach( const query_ptr& q, qlist )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << (qlonglong)q.data() << q->toString();
|
||||
// qDebug() << Q_FUNC_INFO << (qlonglong)q.data() << q->toString();
|
||||
if ( !m_qids.contains( q->id() ) )
|
||||
{
|
||||
m_qids.insert( q->id(), q );
|
||||
@ -189,7 +189,7 @@ Pipeline::reportResults( QID qid, const QList< result_ptr >& results )
|
||||
if ( decQIDState( q ) == 0 )
|
||||
{
|
||||
// All resolvers have reported back their results for this query now
|
||||
qDebug() << "Finished resolving:" << q->toString();
|
||||
qDebug() << "Finished resolving:" << q->toString() << q->numResults();
|
||||
|
||||
if ( !q->solved() )
|
||||
q->onResolvingFinished();
|
||||
@ -216,7 +216,7 @@ Pipeline::shuntNext()
|
||||
return;
|
||||
}
|
||||
|
||||
qDebug() << Q_FUNC_INFO << m_qidsState.count();
|
||||
// qDebug() << Q_FUNC_INFO << m_qidsState.count();
|
||||
// Check if we are ready to dispatch more queries
|
||||
if ( m_qidsState.count() >= CONCURRENT_QUERIES )
|
||||
return;
|
||||
@ -246,8 +246,8 @@ Pipeline::shunt( const query_ptr& q )
|
||||
|
||||
if ( q->solved() )
|
||||
{
|
||||
qDebug() << "Query solved, pipeline aborted:" << q->toString()
|
||||
<< "numresults:" << q->results().length();
|
||||
// qDebug() << "Query solved, pipeline aborted:" << q->toString()
|
||||
// << "numresults:" << q->results().length();
|
||||
|
||||
QList< result_ptr > rl;
|
||||
reportResults( q->id(), rl );
|
||||
@ -275,7 +275,7 @@ Pipeline::shunt( const query_ptr& q )
|
||||
lasttimeout = r->timeout();
|
||||
|
||||
// resolvers aren't allowed to block in this call:
|
||||
qDebug() << "Dispatching to resolver" << r->name();
|
||||
qDebug() << "Dispatching to resolver" << r->name() << q->toString();
|
||||
|
||||
thisResolver = i;
|
||||
r->resolve( q );
|
||||
@ -291,7 +291,7 @@ Pipeline::shunt( const query_ptr& q )
|
||||
if ( thisResolver < m_resolvers.count() )
|
||||
{
|
||||
incQIDState( q );
|
||||
qDebug() << "Shunting in" << lasttimeout << "ms, q:" << q->toString();
|
||||
// qDebug() << "Shunting in" << lasttimeout << "ms, q:" << q->toString();
|
||||
new FuncTimeout( lasttimeout, boost::bind( &Pipeline::shunt, this, q ) );
|
||||
}
|
||||
}
|
||||
@ -329,7 +329,7 @@ Pipeline::incQIDState( const Tomahawk::query_ptr& query )
|
||||
state = m_qidsState.value( query->id() ) + 1;
|
||||
}
|
||||
|
||||
qDebug() << Q_FUNC_INFO << "inserting to qidsstate:" << query->id() << state;
|
||||
// qDebug() << Q_FUNC_INFO << "inserting to qidsstate:" << query->id() << state;
|
||||
m_qidsState.insert( query->id(), state );
|
||||
|
||||
return state;
|
||||
@ -344,12 +344,12 @@ Pipeline::decQIDState( const Tomahawk::query_ptr& query )
|
||||
int state = m_qidsState.value( query->id() ) - 1;
|
||||
if ( state )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << "replacing" << query->id() << state;
|
||||
// qDebug() << Q_FUNC_INFO << "replacing" << query->id() << state;
|
||||
m_qidsState.insert( query->id(), state );
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << "removing" << query->id() << state;
|
||||
// qDebug() << Q_FUNC_INFO << "removing" << query->id() << state;
|
||||
m_qidsState.remove( query->id() );
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ Playlist::Playlist( const source_ptr& src,
|
||||
, m_lastmodified( lastmod )
|
||||
, m_shared( shared )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << "1";
|
||||
// qDebug() << Q_FUNC_INFO << "1";
|
||||
init();
|
||||
}
|
||||
|
||||
|
@ -253,8 +253,8 @@ DynamicPlaylist::reportCreated( const Tomahawk::dynplaylist_ptr& self )
|
||||
Q_ASSERT( !author().isNull() );
|
||||
Q_ASSERT( !author()->collection().isNull() );
|
||||
// will emit Collection::playlistCreated(...)
|
||||
qDebug() << "Creating dynplaylist belonging to:" << author().data() << author().isNull();
|
||||
qDebug() << "REPORTING DYNAMIC PLAYLIST CREATED:" << this << author()->friendlyName();
|
||||
// qDebug() << "Creating dynplaylist belonging to:" << author().data() << author().isNull();
|
||||
// qDebug() << "REPORTING DYNAMIC PLAYLIST CREATED:" << this << author()->friendlyName();
|
||||
author()->collection()->addDynamicPlaylist( self );
|
||||
}
|
||||
|
||||
@ -431,7 +431,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;
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ AnimatedSplitter::hide( int index, bool animate )
|
||||
|
||||
emit hidden( w );
|
||||
w->setMinimumHeight( minHeight );
|
||||
qDebug() << "animating to:" << w->height() << "from" << minHeight;
|
||||
// qDebug() << "animating to:" << w->height() << "from" << minHeight;
|
||||
|
||||
m_animateForward = false;
|
||||
if ( animate )
|
||||
|
@ -56,7 +56,7 @@ Jabber_p::Jabber_p( const QString& jid, const QString& password, const QString&
|
||||
|
||||
if( m_jid.resource().find( "tomahawk" ) == std::string::npos )
|
||||
{
|
||||
qDebug() << "!!! Setting your resource to 'tomahawk' prior to logging in to jabber";
|
||||
// qDebug() << "!!! Setting your resource to 'tomahawk' prior to logging in to jabber";
|
||||
m_jid.setResource( QString( "tomahawk%1" ).arg( qrand() ).toStdString() );
|
||||
}
|
||||
|
||||
@ -210,8 +210,8 @@ Jabber_p::sendMsg( const QString& to, const QString& msg )
|
||||
{
|
||||
if ( QThread::currentThread() != thread() )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << "invoking in correct thread, not"
|
||||
<< QThread::currentThread();
|
||||
// qDebug() << Q_FUNC_INFO << "invoking in correct thread, not"
|
||||
// << QThread::currentThread();
|
||||
|
||||
QMetaObject::invokeMethod( this, "sendMsg",
|
||||
Qt::QueuedConnection,
|
||||
@ -277,7 +277,7 @@ Jabber_p::addContact( const QString& jid, const QString& msg )
|
||||
void
|
||||
Jabber_p::onConnect()
|
||||
{
|
||||
qDebug() << "Connected to the XMPP server";
|
||||
qDebug() << "Connected to the XMPP server" << m_jid.full().c_str();
|
||||
// update jid resource, servers like gtalk use resource binding and may
|
||||
// have changed our requested /resource
|
||||
if ( m_client->resource() != m_jid.resource() )
|
||||
@ -287,7 +287,6 @@ Jabber_p::onConnect()
|
||||
emit jidChanged( jidstr );
|
||||
}
|
||||
|
||||
qDebug() << "Connected as:" << m_jid.full().c_str();
|
||||
emit connected();
|
||||
}
|
||||
|
||||
@ -516,7 +515,7 @@ Jabber_p::handleRoster( const Roster& roster )
|
||||
for ( ; it != roster.end(); ++it )
|
||||
{
|
||||
if ( (*it).second->subscription() != S10nBoth ) continue;
|
||||
qDebug() << (*it).second->jid().c_str() << (*it).second->name().c_str();
|
||||
// qDebug() << (*it).second->jid().c_str() << (*it).second->name().c_str();
|
||||
//printf("JID: %s\n", (*it).second->jid().c_str());
|
||||
}
|
||||
|
||||
@ -539,8 +538,6 @@ Jabber_p::handlePresence( const gloox::Presence& presence )
|
||||
JID jid = presence.from();
|
||||
QString fulljid( jid.full().c_str() );
|
||||
|
||||
qDebug() << "* handleRosterPresence" << fulljid << presence.subtype();
|
||||
|
||||
if( jid == m_jid )
|
||||
return;
|
||||
|
||||
@ -562,6 +559,7 @@ Jabber_p::handlePresence( const gloox::Presence& presence )
|
||||
return;
|
||||
}
|
||||
|
||||
qDebug() << "* handleRosterPresence" << fulljid << presence.subtype();
|
||||
//qDebug() << "handling presence for resource of" << res;
|
||||
|
||||
//qDebug() << Q_FUNC_INFO << "jid:" << QString::fromStdString(item.jid())
|
||||
|
Loading…
x
Reference in New Issue
Block a user