mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-18 23:09:42 +01:00
Quiet down logging a bit.
This commit is contained in:
parent
26f87e8b7a
commit
854c32e8e8
@ -254,10 +254,10 @@ WebSocket::readOutput()
|
||||
std::string outputString = m_outputStream.str();
|
||||
if ( outputString.size() > 0 )
|
||||
{
|
||||
m_outputStream.str("");
|
||||
m_outputStream.str( "" );
|
||||
|
||||
qint64 sizeWritten = m_socket->write( outputString.data(), outputString.size() );
|
||||
tDebug() << Q_FUNC_INFO << "Got " << outputString.size() << "from outstream, wrote" << sizeWritten << "bytes to the socket";
|
||||
// tDebug() << Q_FUNC_INFO << "Got" << outputString.size() << "from outstream, wrote" << sizeWritten << "bytes to the socket";
|
||||
if ( sizeWritten == -1 )
|
||||
{
|
||||
tLog() << Q_FUNC_INFO << "Error during writing, closing connection";
|
||||
@ -291,6 +291,7 @@ WebSocket::readOutput()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WebSocket::socketReadyRead()
|
||||
{
|
||||
@ -311,7 +312,8 @@ WebSocket::socketReadyRead()
|
||||
QByteArray buf;
|
||||
buf.resize( bytes );
|
||||
qint64 bytesRead = m_socket->read( buf.data(), bytes );
|
||||
tDebug() << Q_FUNC_INFO << "Bytes available: " << bytes << ", bytes read:" << bytesRead; // << ", content is" << websocketpp::utility::to_hex( buf.constData(), bytesRead ).data();
|
||||
// tDebug() << Q_FUNC_INFO << "Bytes available:" << bytes << ", bytes read:" << bytesRead;
|
||||
// << ", content is" << websocketpp::utility::to_hex( buf.constData(), bytesRead ).data();
|
||||
if ( bytesRead != bytes )
|
||||
{
|
||||
tLog() << Q_FUNC_INFO << "Error occurred during socket read. Something is wrong; disconnecting";
|
||||
@ -349,6 +351,7 @@ WebSocket::encodeMessage( const QByteArray &bytes )
|
||||
QMetaObject::invokeMethod( this, "readOutput", Qt::QueuedConnection );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
onMessage( WebSocket* ws, websocketpp::connection_hdl, hatchet_client::message_ptr msg )
|
||||
{
|
||||
@ -357,6 +360,7 @@ onMessage( WebSocket* ws, websocketpp::connection_hdl, hatchet_client::message_p
|
||||
ws->decodedMessage( QByteArray( payload.data(), payload.length() ) );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
onClose( WebSocket *ws, websocketpp::connection_hdl )
|
||||
{
|
||||
|
@ -93,7 +93,7 @@ CredentialsManager::loadCredentials( const QString &service )
|
||||
#ifdef Q_OS_MAC
|
||||
foreach ( QString key, accountIds )
|
||||
{
|
||||
tDebug() << "beginGroup" << QString( "accounts/%1" ).arg( key );
|
||||
tDebug() << Q_FUNC_INFO << "beginGroup" << QString( "accounts/%1" ).arg( key );
|
||||
TomahawkSettings::instance()->beginGroup( QString( "accounts/%1" ).arg( key ) );
|
||||
const QVariantMap creds = TomahawkSettings::instance()->value( "credentials" ).toMap();
|
||||
tDebug() << creds[ "username" ]
|
||||
@ -120,7 +120,7 @@ CredentialsManager::loadCredentials( const QString &service )
|
||||
SLOT( keychainJobFinished( QKeychain::Job* ) ) );
|
||||
m_readJobs[ service ] << j;
|
||||
j->start();
|
||||
tDebug() << "Launching QtKeychain readJob for" << key;
|
||||
tDebug() << Q_FUNC_INFO << "Launching QtKeychain readJob for" << key;
|
||||
}
|
||||
|
||||
if ( m_readJobs[ service ].isEmpty() )
|
||||
@ -171,7 +171,7 @@ CredentialsManager::credentials( const QString& serviceName, const QString& key
|
||||
void
|
||||
CredentialsManager::setCredentials( const CredentialsStorageKey& csKey, const QVariant& value, bool tryToWriteAsString )
|
||||
{
|
||||
tDebug() << Q_FUNC_INFO;
|
||||
// tDebug() << Q_FUNC_INFO;
|
||||
QMutexLocker locker( &m_mutex );
|
||||
|
||||
QKeychain::Job* j;
|
||||
@ -222,11 +222,11 @@ CredentialsManager::setCredentials( const CredentialsStorageKey& csKey, const QV
|
||||
|
||||
if ( ok )
|
||||
{
|
||||
tDebug() << "About to write credentials for key" << csKey.key();
|
||||
tDebug() << Q_FUNC_INFO << "About to write credentials for key" << csKey.key();
|
||||
}
|
||||
else
|
||||
{
|
||||
tDebug() << "Cannot serialize credentials for writing" << csKey.key();
|
||||
tDebug() << Q_FUNC_INFO << "Cannot serialize credentials for writing" << csKey.key();
|
||||
}
|
||||
|
||||
wj->setTextData( data );
|
||||
@ -267,12 +267,12 @@ void
|
||||
CredentialsManager::keychainJobFinished( QKeychain::Job* j )
|
||||
{
|
||||
#ifndef Q_OS_MAC
|
||||
tDebug() << Q_FUNC_INFO;
|
||||
// tDebug() << Q_FUNC_INFO;
|
||||
if ( QKeychain::ReadPasswordJob* readJob = qobject_cast< QKeychain::ReadPasswordJob* >( j ) )
|
||||
{
|
||||
if ( readJob->error() == QKeychain::NoError )
|
||||
{
|
||||
tDebug() << "QtKeychain readJob for" << readJob->service() << "/"
|
||||
tDebug() << Q_FUNC_INFO << "QtKeychain readJob for" << readJob->service() << "/"
|
||||
<< readJob->key() << "finished without errors";
|
||||
|
||||
QVariant creds;
|
||||
@ -292,7 +292,7 @@ CredentialsManager::keychainJobFinished( QKeychain::Job* j )
|
||||
}
|
||||
else
|
||||
{
|
||||
tDebug() << "QtKeychain readJob for" << readJob->service() << "/" << readJob->key() << "finished with ERROR:" << j->error() << j->errorString();
|
||||
tDebug() << Q_FUNC_INFO << "QtKeychain readJob for" << readJob->service() << "/" << readJob->key() << "finished with ERROR:" << j->error() << j->errorString();
|
||||
}
|
||||
|
||||
m_readJobs[ readJob->service() ].removeOne( readJob );
|
||||
|
@ -933,7 +933,7 @@ PlayableModel::startLoading()
|
||||
Q_D( PlayableModel );
|
||||
if ( !d->loading )
|
||||
{
|
||||
tDebug() << Q_FUNC_INFO;
|
||||
// tDebug() << Q_FUNC_INFO;
|
||||
d->loading = true;
|
||||
emit loadingStarted();
|
||||
}
|
||||
@ -1280,6 +1280,6 @@ PlayableModel::indexFromSource( const Tomahawk::source_ptr& source ) const
|
||||
}
|
||||
}
|
||||
|
||||
tDebug() << "Could not find item for source:" << source->friendlyName();
|
||||
// tDebug() << "Could not find item for source:" << source->friendlyName();
|
||||
return QModelIndex();
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ QueueProxyModel::onIndexChanged( const QModelIndex& index )
|
||||
PlayableItem* item = itemFromIndex( mapToSource( index ) );
|
||||
if ( item && item->query() )
|
||||
{
|
||||
tDebug() << item->query()->toString() << item->query()->resolvingFinished() << item->query()->playable();
|
||||
// tDebug() << Q_FUNC_INFO << item->query()->toString() << item->query()->resolvingFinished() << item->query()->playable();
|
||||
}
|
||||
if ( !item || !item->query() || ( item->query()->resolvingFinished() && !item->query()->playable() ) )
|
||||
{
|
||||
|
@ -331,9 +331,9 @@ TreeModel::onTracksFound( const QList<Tomahawk::query_ptr>& tracks, Tomahawk::Mo
|
||||
|
||||
Tomahawk::Album* album = qobject_cast<Tomahawk::Album*>( sender() );
|
||||
|
||||
tDebug() << "Adding album:" << album->artist()->name() << album->name() << album->id();
|
||||
tDebug() << Q_FUNC_INFO << "Adding album:" << album->artist()->name() << album->name() << album->id();
|
||||
QModelIndex idx = indexFromAlbum( album->weakRef().toStrongRef() );
|
||||
tDebug() << "Adding tracks" << tracks.count() << "to index:" << idx;
|
||||
tDebug() << Q_FUNC_INFO << "Adding tracks" << tracks.count() << "to index:" << idx;
|
||||
onTracksAdded( tracks, idx );
|
||||
}
|
||||
|
||||
@ -351,7 +351,7 @@ TreeModel::indexFromArtist( const Tomahawk::artist_ptr& artist ) const
|
||||
}
|
||||
}
|
||||
|
||||
tDebug() << "Could not find item for artist:" << artist->name();
|
||||
tDebug() << Q_FUNC_INFO << "Could not find item for artist:" << artist->name();
|
||||
return QModelIndex();
|
||||
}
|
||||
|
||||
@ -370,7 +370,7 @@ TreeModel::indexFromAlbum( const Tomahawk::album_ptr& album ) const
|
||||
}
|
||||
}
|
||||
|
||||
tDebug() << "Could not find item for album:" << album->name() << album->artist()->name();
|
||||
tDebug() << Q_FUNC_INFO << "Could not find item for album:" << album->name() << album->artist()->name();
|
||||
return QModelIndex();
|
||||
}
|
||||
|
||||
@ -383,14 +383,14 @@ TreeModel::indexFromResult( const Tomahawk::result_ptr& result ) const
|
||||
{
|
||||
QModelIndex idx = index( i, 0, albumIdx );
|
||||
PlayableItem* item = itemFromIndex( idx );
|
||||
tDebug() << item->result()->toString();
|
||||
// tDebug() << Q_FUNC_INFO << item->result()->toString();
|
||||
if ( item && item->result() == result )
|
||||
{
|
||||
return idx;
|
||||
}
|
||||
}
|
||||
|
||||
tDebug() << "Could not find item for result:" << result->toString();
|
||||
tDebug() << Q_FUNC_INFO << "Could not find item for result:" << result->toString();
|
||||
return QModelIndex();
|
||||
}
|
||||
|
||||
@ -409,7 +409,7 @@ TreeModel::indexFromQuery( const Tomahawk::query_ptr& query ) const
|
||||
}
|
||||
}
|
||||
|
||||
tDebug() << "Could not find item for query:" << query->toString();
|
||||
tDebug() << Q_FUNC_INFO << "Could not find item for query:" << query->toString();
|
||||
return QModelIndex();
|
||||
}
|
||||
|
||||
@ -428,6 +428,6 @@ TreeModel::itemFromResult( const Tomahawk::result_ptr& result ) const
|
||||
}
|
||||
}
|
||||
|
||||
tDebug() << "Could not find item for result:" << result->toString();
|
||||
tDebug() << Q_FUNC_INFO << "Could not find item for result:" << result->toString();
|
||||
return 0;
|
||||
}
|
||||
|
@ -145,7 +145,6 @@ ScriptResolver::sendConfig()
|
||||
tDebug() << "Nam proxy is:" << Tomahawk::Utils::nam()->proxyFactory();
|
||||
Tomahawk::Utils::nam()->proxyFactory()->queryProxy();
|
||||
Tomahawk::Utils::NetworkProxyFactory* factory = dynamic_cast<Tomahawk::Utils::NetworkProxyFactory*>( Tomahawk::Utils::nam()->proxyFactory() );
|
||||
tDebug() << "Factory is:" << factory;
|
||||
QNetworkProxy proxy = factory->proxy();
|
||||
QString proxyType = ( proxy.type() == QNetworkProxy::Socks5Proxy ? "socks5" : "none" );
|
||||
m.insert( "proxytype", proxyType );
|
||||
|
@ -344,7 +344,7 @@ PeerInfo::avatar( TomahawkUtils::ImageMode style, const QSize& size ) const
|
||||
|
||||
if ( d->avatar.isNull() )
|
||||
{
|
||||
tDebug() << "Avatar for:" << id();
|
||||
// tDebug() << "Avatar for:" << id();
|
||||
Q_ASSERT( !contactId().isEmpty() );
|
||||
if ( d->avatarBuffer.isEmpty() && !contactId().isEmpty() )
|
||||
d->avatarBuffer = TomahawkUtils::Cache::instance()->getData( "Sources", contactId() ).toByteArray();
|
||||
|
@ -171,7 +171,7 @@ PluginLoader::pluginPaths( const QString& name ) const
|
||||
QSet< QString > paths;
|
||||
foreach ( const QDir& pluginDir, pluginDirs() )
|
||||
{
|
||||
tDebug() << Q_FUNC_INFO << "Checking directory for" << type << "plugins:" << pluginDir;
|
||||
tDebug() << Q_FUNC_INFO << "Checking directory for" << type << "plugins:" << pluginDir.absolutePath();
|
||||
foreach ( QString fileName, pluginDir.entryList( pluginFilenames( name ), QDir::Files ) )
|
||||
{
|
||||
//TODO: do we really need to check this?!
|
||||
|
@ -200,7 +200,7 @@ AccountListWidget::removeEntries( const QModelIndex& parent, int start, int end
|
||||
void
|
||||
AccountListWidget::toggleOnlineStateForAll()
|
||||
{
|
||||
tDebug() << Q_FUNC_INFO;
|
||||
// tDebug() << Q_FUNC_INFO;
|
||||
bool newState = !m_toggleOnlineButtonState;
|
||||
foreach ( QList< AccountWidget* > awgts, m_entries )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user