mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 05:37:29 +02:00
* Hopefully the last set of debug spam cleanup :-)
This commit is contained in:
@@ -70,10 +70,10 @@ ACLSystem::~ACLSystem()
|
||||
ACLSystem::ACL
|
||||
ACLSystem::isAuthorizedUser( const QString& dbid )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
// qDebug() << Q_FUNC_INFO;
|
||||
QMutexLocker locker( &m_cacheMutex );
|
||||
qDebug() << "Current cache keys = " << m_cache.keys();
|
||||
qDebug() << "Looking up dbid";
|
||||
qDebug() << "Current cache keys =" << m_cache.keys();
|
||||
// qDebug() << "Looking up dbid";
|
||||
if( !m_cache.contains( dbid ) )
|
||||
return ACLSystem::NotFound;
|
||||
else
|
||||
@@ -88,7 +88,7 @@ ACLSystem::isAuthorizedUser( const QString& dbid )
|
||||
void
|
||||
ACLSystem::authorizeUser( const QString& dbid, ACLSystem::ACL globalType )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
// qDebug() << Q_FUNC_INFO;
|
||||
if( globalType == ACLSystem::NotFound )
|
||||
return;
|
||||
|
||||
|
@@ -185,7 +185,7 @@ Collection::station( const QString& guid )
|
||||
void
|
||||
Collection::setPlaylists( const QList<Tomahawk::playlist_ptr>& plists )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << plists.count();
|
||||
// qDebug() << Q_FUNC_INFO << plists.count();
|
||||
foreach ( const playlist_ptr& p, plists )
|
||||
{
|
||||
// qDebug() << "Batch inserting playlist:" << p->guid();
|
||||
@@ -198,7 +198,7 @@ Collection::setPlaylists( const QList<Tomahawk::playlist_ptr>& plists )
|
||||
void
|
||||
Collection::setAutoPlaylists( const QList< Tomahawk::dynplaylist_ptr >& plists )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << plists.count();
|
||||
// qDebug() << Q_FUNC_INFO << plists.count();
|
||||
|
||||
foreach ( const dynplaylist_ptr& p, plists )
|
||||
{
|
||||
@@ -212,7 +212,7 @@ Collection::setAutoPlaylists( const QList< Tomahawk::dynplaylist_ptr >& plists )
|
||||
void
|
||||
Collection::setStations( const QList< dynplaylist_ptr >& stations )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << stations.count();
|
||||
// qDebug() << Q_FUNC_INFO << stations.count();
|
||||
|
||||
foreach ( const dynplaylist_ptr& s, stations )
|
||||
{
|
||||
@@ -226,7 +226,7 @@ Collection::setStations( const QList< dynplaylist_ptr >& stations )
|
||||
void
|
||||
Collection::setTracks( const QList<Tomahawk::query_ptr>& tracks )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << tracks.count() << name();
|
||||
// qDebug() << Q_FUNC_INFO << tracks.count() << name();
|
||||
|
||||
m_tracks << tracks;
|
||||
emit tracksAdded( tracks );
|
||||
|
@@ -38,7 +38,6 @@ DatabaseCollection::DatabaseCollection( const source_ptr& src, QObject* parent )
|
||||
void
|
||||
DatabaseCollection::loadPlaylists()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
DatabaseCommand_LoadAllPlaylists* cmd = new DatabaseCommand_LoadAllPlaylists( source() );
|
||||
|
||||
connect( cmd, SIGNAL( done( const QList<Tomahawk::playlist_ptr>& ) ),
|
||||
@@ -51,7 +50,6 @@ DatabaseCollection::loadPlaylists()
|
||||
void
|
||||
DatabaseCollection::loadAutoPlaylists()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
DatabaseCommand_LoadAllAutoPlaylists* cmd = new DatabaseCommand_LoadAllAutoPlaylists( source() );
|
||||
|
||||
connect( cmd, SIGNAL( autoPlaylistLoaded( Tomahawk::source_ptr, QVariantList ) ),
|
||||
@@ -60,10 +58,10 @@ DatabaseCollection::loadAutoPlaylists()
|
||||
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>( cmd ) );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DatabaseCollection::loadStations()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
DatabaseCommand_LoadAllStations* cmd = new DatabaseCommand_LoadAllStations( source() );
|
||||
|
||||
connect( cmd, SIGNAL( stationLoaded( Tomahawk::source_ptr, QVariantList ) ),
|
||||
@@ -110,8 +108,6 @@ DatabaseCollection::removeTracks( const QDir& dir )
|
||||
QList< Tomahawk::playlist_ptr >
|
||||
DatabaseCollection::playlists()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
|
||||
if ( Collection::playlists().isEmpty() )
|
||||
{
|
||||
loadPlaylists();
|
||||
@@ -124,8 +120,6 @@ DatabaseCollection::playlists()
|
||||
QList< dynplaylist_ptr >
|
||||
DatabaseCollection::autoPlaylists()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
|
||||
if ( Collection::autoPlaylists().isEmpty() )
|
||||
{
|
||||
loadAutoPlaylists();
|
||||
@@ -134,11 +128,10 @@ DatabaseCollection::autoPlaylists()
|
||||
return Collection::autoPlaylists();
|
||||
}
|
||||
|
||||
|
||||
QList< dynplaylist_ptr >
|
||||
DatabaseCollection::stations()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
|
||||
if ( Collection::stations().isEmpty() )
|
||||
{
|
||||
loadStations();
|
||||
@@ -151,8 +144,6 @@ DatabaseCollection::stations()
|
||||
QList< Tomahawk::query_ptr >
|
||||
DatabaseCollection::tracks()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
|
||||
if ( !isLoaded() )
|
||||
{
|
||||
loadTracks();
|
||||
@@ -161,6 +152,7 @@ DatabaseCollection::tracks()
|
||||
return Collection::tracks();
|
||||
}
|
||||
|
||||
|
||||
void DatabaseCollection::autoPlaylistCreated( const source_ptr& source, const QVariantList& data )
|
||||
{
|
||||
dynplaylist_ptr p( new DynamicPlaylist( source, //src
|
||||
@@ -177,6 +169,7 @@ void DatabaseCollection::autoPlaylistCreated( const source_ptr& source, const QV
|
||||
addAutoPlaylist( p );
|
||||
}
|
||||
|
||||
|
||||
void DatabaseCollection::stationCreated( const source_ptr& source, const QVariantList& data )
|
||||
{
|
||||
dynplaylist_ptr p( new DynamicPlaylist( source, //src
|
||||
|
@@ -35,8 +35,9 @@ class DatabaseCommand_LoadDynamicPlaylist : public DatabaseCommand_LoadPlaylistE
|
||||
public:
|
||||
explicit DatabaseCommand_LoadDynamicPlaylist( QString revision_guid, QObject* parent = 0 )
|
||||
: DatabaseCommand_LoadPlaylistEntries( revision_guid, parent )
|
||||
{ qDebug() << "loaded with:" << revision_guid << guid(); }
|
||||
|
||||
{
|
||||
// qDebug() << "loaded with:" << revision_guid << guid();
|
||||
}
|
||||
|
||||
virtual void exec( DatabaseImpl* );
|
||||
virtual bool doesMutates() const { return false; }
|
||||
|
@@ -108,31 +108,31 @@ Servent::startListening( QHostAddress ha, bool upnp, int port )
|
||||
defPortAlso = listen( ha, defPort );
|
||||
if( !defPortAlso )
|
||||
{
|
||||
qDebug() << "Failed to listen on both port " << m_port << " and port " << defPort;
|
||||
qDebug() << "Error string is " << errorString();
|
||||
qDebug() << "Failed to listen on both port" << m_port << "and port" << defPort;
|
||||
qDebug() << "Error string is" << errorString();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
qDebug() << "Servent listening on port " << defPort << " servent thread:" << thread();
|
||||
qDebug() << "Servent listening on port" << defPort << "servent thread:" << thread();
|
||||
}
|
||||
else
|
||||
{
|
||||
bool defPortAlso = listen( ha, defPort );
|
||||
qDebug() << "Servent listening on port " << m_port << " servent thread:" << thread();
|
||||
qDebug() << "Servent listening on port" << m_port << "servent thread:" << thread();
|
||||
if( defPortAlso )
|
||||
qDebug() << "Servent also listening on port " << defPort << " servent thread:" << thread();
|
||||
qDebug() << "Servent also listening on port" << defPort << "servent thread:" << thread();
|
||||
}
|
||||
|
||||
// --lanhack means to advertise your LAN IP over jabber as if it were externallyVisible
|
||||
qDebug() << "Address mode = " << (int)(TomahawkSettings::instance()->externalAddressMode());
|
||||
qDebug() << "Static host/port preferred ? = " << ( TomahawkSettings::instance()->preferStaticHostPort() ? "true" : "false" );
|
||||
qDebug() << "Address mode =" << (int)(TomahawkSettings::instance()->externalAddressMode());
|
||||
qDebug() << "Static host/port preferred =" << ( TomahawkSettings::instance()->preferStaticHostPort() ? "true" : "false" );
|
||||
|
||||
if( TomahawkSettings::instance()->preferStaticHostPort() )
|
||||
{
|
||||
qDebug() << "Forcing static preferred host and port";
|
||||
m_externalHostname = TomahawkSettings::instance()->externalHostname();
|
||||
m_externalPort = TomahawkSettings::instance()->externalPort();
|
||||
qDebug() << m_externalHostname << m_externalPort;
|
||||
// qDebug() << m_externalHostname << m_externalPort;
|
||||
emit ready();
|
||||
return true;
|
||||
}
|
||||
@@ -176,7 +176,7 @@ Servent::startListening( QHostAddress ha, bool upnp, int port )
|
||||
QString
|
||||
Servent::createConnectionKey( const QString& name, const QString &nodeid, const QString &key, bool onceOnly )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
// qDebug() << Q_FUNC_INFO;
|
||||
Q_ASSERT( this->thread() == QThread::currentThread() );
|
||||
|
||||
QString _key = ( key.isEmpty() ? uuid() : key );
|
||||
@@ -226,7 +226,7 @@ Servent::registerOffer( const QString& key, Connection* conn )
|
||||
void
|
||||
Servent::registerControlConnection( ControlConnection* conn )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << conn->id();
|
||||
// qDebug() << Q_FUNC_INFO << conn->id();
|
||||
m_controlconnections.append( conn );
|
||||
}
|
||||
|
||||
@@ -274,7 +274,7 @@ Servent::incomingConnection( int sd )
|
||||
|
||||
connect( sock, SIGNAL( readyRead() ), SLOT( readyRead() ), Qt::QueuedConnection );
|
||||
connect( sock, SIGNAL( disconnected() ), sock, SLOT( deleteLater() ), Qt::QueuedConnection );
|
||||
qDebug() << "connection accepted.";
|
||||
// qDebug() << "connection accepted.";
|
||||
}
|
||||
|
||||
|
||||
@@ -324,13 +324,13 @@ Servent::readyRead()
|
||||
nodeid = m.value( "nodeid" ).toString();
|
||||
controlid = m.value( "controlid" ).toString();
|
||||
|
||||
qDebug() << "Incoming connection details: " << m;
|
||||
qDebug() << "Incoming connection details:" << m;
|
||||
|
||||
if( !nodeid.isEmpty() ) // only control connections send nodeid
|
||||
{
|
||||
foreach( ControlConnection* con, m_controlconnections )
|
||||
{
|
||||
qDebug() << con->socket() << sock;
|
||||
// qDebug() << con->socket() << sock;
|
||||
if( con->id() == nodeid )
|
||||
{
|
||||
qDebug() << "Duplicate control connection detected, dropping:" << nodeid << conntype;
|
||||
@@ -420,7 +420,7 @@ Servent::socketConnected()
|
||||
{
|
||||
QTcpSocketExtra* sock = (QTcpSocketExtra*)sender();
|
||||
|
||||
qDebug() << "Servent::SocketConnected" << thread() << "socket:" << sock;
|
||||
// qDebug() << "Servent::SocketConnected" << thread() << "socket:" << sock;
|
||||
|
||||
Connection* conn = sock->_conn;
|
||||
handoverSocket( conn, sock );
|
||||
@@ -565,7 +565,7 @@ Servent::reverseOfferRequest( ControlConnection* orig_conn, const QString &their
|
||||
Connection*
|
||||
Servent::claimOffer( ControlConnection* cc, const QString &nodeid, const QString &key, const QHostAddress peer )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
// qDebug() << Q_FUNC_INFO;
|
||||
|
||||
bool noauth = qApp->arguments().contains( "--noauth" );
|
||||
|
||||
@@ -722,7 +722,7 @@ Servent::checkACL( const Connection* conn, const QString &nodeid, bool showDialo
|
||||
QSharedPointer<QIODevice>
|
||||
Servent::remoteIODeviceFactory( const result_ptr& result )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << thread();
|
||||
// qDebug() << Q_FUNC_INFO << thread();
|
||||
QSharedPointer<QIODevice> sp;
|
||||
|
||||
QStringList parts = result->url().mid( QString( "servent://" ).length() ).split( "\t" );
|
||||
@@ -809,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;
|
||||
}
|
||||
|
@@ -56,7 +56,7 @@ DynamicPlaylist::DynamicPlaylist ( const Tomahawk::source_ptr& src,
|
||||
const QString& guid )
|
||||
: Playlist( src, currentrevision, title, info, creator, createdOn, shared, lastmod, guid )
|
||||
{
|
||||
qDebug() << "Creating Dynamic Playlist 1";
|
||||
// qDebug() << "Creating Dynamic Playlist 1";
|
||||
// TODO instantiate generator
|
||||
m_generator = geninterface_ptr( GeneratorFactory::create( type ) );
|
||||
m_generator->setMode( mode );
|
||||
@@ -74,7 +74,7 @@ DynamicPlaylist::DynamicPlaylist ( const Tomahawk::source_ptr& author,
|
||||
bool shared )
|
||||
: Playlist ( author, guid, title, info, creator, shared )
|
||||
{
|
||||
qDebug() << "Creating Dynamic Playlist 2";
|
||||
// qDebug() << "Creating Dynamic Playlist 2";
|
||||
m_generator = geninterface_ptr( GeneratorFactory::create( type ) );
|
||||
m_generator->setMode( mode );
|
||||
}
|
||||
@@ -208,7 +208,7 @@ DynamicPlaylist::createNewRevision( const QString& newrev,
|
||||
void
|
||||
DynamicPlaylist::loadRevision( const QString& rev )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << "Loading with:" << ( rev.isEmpty() ? currentrevision() : rev );
|
||||
// qDebug() << Q_FUNC_INFO << "Loading with:" << ( rev.isEmpty() ? currentrevision() : rev );
|
||||
|
||||
setBusy( true );
|
||||
DatabaseCommand_LoadDynamicPlaylist* cmd = new DatabaseCommand_LoadDynamicPlaylist( rev.isEmpty() ? currentrevision() : rev );
|
||||
@@ -258,7 +258,7 @@ DynamicPlaylist::remove( const Tomahawk::dynplaylist_ptr& playlist )
|
||||
void
|
||||
DynamicPlaylist::reportCreated( const Tomahawk::dynplaylist_ptr& self )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
// qDebug() << Q_FUNC_INFO;
|
||||
Q_ASSERT( self.data() == this );
|
||||
Q_ASSERT( !author().isNull() );
|
||||
Q_ASSERT( !author()->collection().isNull() );
|
||||
@@ -274,7 +274,7 @@ DynamicPlaylist::reportCreated( const Tomahawk::dynplaylist_ptr& self )
|
||||
void
|
||||
DynamicPlaylist::reportDeleted( const Tomahawk::dynplaylist_ptr& self )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
// qDebug() << Q_FUNC_INFO;
|
||||
Q_ASSERT( self.data() == this );
|
||||
// will emit Collection::playlistDeleted(...)
|
||||
if( self->mode() == Static )
|
||||
|
@@ -66,7 +66,7 @@ Tomahawk::EchonestControl::setSelectedType ( const QString& type )
|
||||
Tomahawk::DynamicControl::setSelectedType ( type );
|
||||
updateWidgets();
|
||||
updateData();
|
||||
qDebug() << "Setting new type, set data to:" << m_data.first << m_data.second;
|
||||
// qDebug() << "Setting new type, set data to:" << m_data.first << m_data.second;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -494,7 +494,7 @@ void Tomahawk::EchonestControl::updateToLabelAndCombo()
|
||||
void
|
||||
Tomahawk::EchonestControl::editingFinished()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
// qDebug() << Q_FUNC_INFO;
|
||||
m_editingTimer.start();
|
||||
}
|
||||
|
||||
|
@@ -55,7 +55,7 @@ EchonestGenerator::EchonestGenerator ( QObject* parent )
|
||||
m_type = "echonest";
|
||||
m_mode = OnDemand;
|
||||
m_logo.load( RESPATH "/images/echonest_logo.png" );
|
||||
qDebug() << "ECHONEST:" << m_logo.size();
|
||||
// qDebug() << "ECHONEST:" << m_logo.size();
|
||||
}
|
||||
|
||||
EchonestGenerator::~EchonestGenerator()
|
||||
@@ -77,11 +77,11 @@ QPixmap EchonestGenerator::logo()
|
||||
|
||||
|
||||
void
|
||||
EchonestGenerator::generate ( int number )
|
||||
EchonestGenerator::generate( int number )
|
||||
{
|
||||
// convert to an echonest query, and fire it off
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
qDebug() << "Generating playlist with " << m_controls.size();
|
||||
qDebug() << "Generating playlist with" << m_controls.size();
|
||||
foreach( const dyncontrol_ptr& ctrl, m_controls )
|
||||
qDebug() << ctrl->selectedType() << ctrl->match() << ctrl->input();
|
||||
|
||||
@@ -147,7 +147,7 @@ EchonestGenerator::staticFinished()
|
||||
try {
|
||||
songs = Echonest::DynamicPlaylist::parseStaticPlaylist( reply );
|
||||
} catch( const Echonest::ParseError& e ) {
|
||||
qWarning() << "libechonest threw an error trying to parse the static playlist! code" << e.errorType() << "error desc:" << e.what();
|
||||
qWarning() << "libechonest threw an error trying to parse the static playlist code" << e.errorType() << "error desc:" << e.what();
|
||||
|
||||
emit error( "The Echo Nest returned an error creating the playlist", e.what() );
|
||||
return;
|
||||
|
@@ -373,7 +373,7 @@ setProxy( QNetworkProxy* proxy )
|
||||
{
|
||||
s_proxy = proxy;
|
||||
s_nam.data()->setProxy( *proxy );
|
||||
qDebug() << Q_FUNC_INFO << " setting proxy to use proxy DNS? " << (TomahawkSettings::instance()->proxyDns() ? "true" : "false");
|
||||
qDebug() << Q_FUNC_INFO << "setting proxy to use proxy DNS?" << (TomahawkSettings::instance()->proxyDns() ? "true" : "false");
|
||||
if ( !TomahawkSettings::instance()->proxyDns() )
|
||||
s_proxy->setCapabilities( QNetworkProxy::TunnelingCapability | QNetworkProxy::ListeningCapability | QNetworkProxy::UdpTunnelingCapability );
|
||||
}
|
||||
@@ -410,8 +410,7 @@ DNSResolver::resolve( QString &host, QString type )
|
||||
// For the moment, assume we are looking for XMPP...
|
||||
QString fullHost( "_xmpp-client._tcp." + host );
|
||||
|
||||
qDebug() << "Looking up SRV record for " << fullHost.toUtf8();
|
||||
|
||||
qDebug() << "Looking up SRV record for" << fullHost.toUtf8();
|
||||
m_dnsSharedRequest->query( fullHost.toUtf8(), QJDns::Srv );
|
||||
}
|
||||
else
|
||||
@@ -429,7 +428,7 @@ DNSResolver::resultsReady()
|
||||
QList<QJDns::Record> results = m_dnsSharedRequest->results();
|
||||
foreach( QJDns::Record r, results )
|
||||
{
|
||||
qDebug() << "Found result (of some type): " << QString( r.name );
|
||||
qDebug() << "Found result (of some type):" << QString( r.name );
|
||||
if( r.type == QJDns::Srv )
|
||||
{
|
||||
QString foundResult( r.name );
|
||||
@@ -438,7 +437,7 @@ DNSResolver::resultsReady()
|
||||
}
|
||||
}
|
||||
}
|
||||
qDebug() << "DNS resolve request was NOT successful! Error: " << (int)(m_dnsSharedRequest->error());
|
||||
qDebug() << "DNS resolve request was NOT successful! Error:" << (int)(m_dnsSharedRequest->error());
|
||||
QString badResult( "NONE" );
|
||||
emit result( badResult );
|
||||
}
|
||||
|
@@ -178,7 +178,7 @@ CollectionItem::playlistsDeletedInternal( SourceTreeItem* parent, const QList< T
|
||||
void
|
||||
CollectionItem::onPlaylistsAdded( const QList< playlist_ptr >& playlists )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << m_source->friendlyName() << playlists.count();
|
||||
// qDebug() << Q_FUNC_INFO << m_source->friendlyName() << playlists.count();
|
||||
|
||||
if( playlists.isEmpty() )
|
||||
return;
|
||||
|
Reference in New Issue
Block a user