From b2b836ff019a8f4a7b9c2bae3ddd28ffc2a0ea57 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Fri, 20 May 2011 01:16:06 +0200 Subject: [PATCH] * Fixed unnamed DbCmd_SourceOffline & removed more debug output. Sigh :-) --- .../database/databasecommand_sourceoffline.h | 5 ++++- src/resolvers/scriptresolver.cpp | 10 ++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/libtomahawk/database/databasecommand_sourceoffline.h b/src/libtomahawk/database/databasecommand_sourceoffline.h index 7f50578e1..302b349ec 100644 --- a/src/libtomahawk/database/databasecommand_sourceoffline.h +++ b/src/libtomahawk/database/databasecommand_sourceoffline.h @@ -1,5 +1,5 @@ /* === This file is part of Tomahawk Player - === - * + * * Copyright 2010-2011, Christian Muehlhaeuser * * Tomahawk is free software: you can redistribute it and/or modify @@ -30,6 +30,9 @@ Q_OBJECT public: explicit DatabaseCommand_SourceOffline( int id ); + + virtual QString commandname() const { return "sourceoffline"; } + bool doesMutates() const { return true; } void exec( DatabaseImpl* lib ); diff --git a/src/resolvers/scriptresolver.cpp b/src/resolvers/scriptresolver.cpp index 7a5d23fa7..76e44d1f7 100644 --- a/src/resolvers/scriptresolver.cpp +++ b/src/resolvers/scriptresolver.cpp @@ -95,7 +95,7 @@ ScriptResolver::readStdout() void ScriptResolver::sendMsg( const QByteArray& msg ) { - qDebug() << Q_FUNC_INFO << m_ready << msg << msg.length(); +// qDebug() << Q_FUNC_INFO << m_ready << msg << msg.length(); quint32 len; qToBigEndian( msg.length(), (uchar*) &len ); @@ -107,7 +107,7 @@ ScriptResolver::sendMsg( const QByteArray& msg ) void ScriptResolver::handleMsg( const QByteArray& msg ) { - qDebug() << Q_FUNC_INFO << msg.size() << QString::fromAscii( msg ); +// qDebug() << Q_FUNC_INFO << msg.size() << QString::fromAscii( msg ); bool ok; QVariant v = m_parser.parse( msg, &ok ); @@ -213,7 +213,7 @@ ScriptResolver::resolve( const Tomahawk::query_ptr& query ) m.insert( "qid", query->id() ); const QByteArray msg = m_serializer.serialize( QVariant( m ) ); - qDebug() << "ASKING SCRIPT RESOLVER TO RESOLVE:" << msg; +// qDebug() << "ASKING SCRIPT RESOLVER TO RESOLVE:" << msg; sendMsg( msg ); } @@ -221,7 +221,8 @@ ScriptResolver::resolve( const Tomahawk::query_ptr& query ) void ScriptResolver::doSetup( const QVariantMap& m ) { - qDebug() << Q_FUNC_INFO << m; +// qDebug() << Q_FUNC_INFO << m; + m_name = m.value( "name" ).toString(); m_weight = m.value( "weight", 0 ).toUInt(); m_timeout = m.value( "timeout", 25 ).toUInt() * 1000; @@ -267,6 +268,7 @@ ScriptResolver::saveConfig() sendMsg( data ); } + QWidget* ScriptResolver::configUI() const { if( m_configWidget.isNull() )