1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-01-17 06:18:17 +01:00

Add resolvers to diagnostics dialog

This commit is contained in:
Dominik Schmidt 2016-01-07 00:41:14 +01:00
parent 9b1b7be207
commit 4ba32e0add
3 changed files with 25 additions and 0 deletions

View File

@ -149,6 +149,15 @@ Pipeline::removeResolver( Resolver* r )
}
QList< Tomahawk::Resolver* >
Pipeline::resolvers() const
{
Q_D( const Pipeline );
return d->resolvers;
}
void
Pipeline::addResolver( Resolver* r )
{

View File

@ -66,6 +66,7 @@ public:
QList< QPointer< ExternalResolver > > scriptResolvers() const;
Tomahawk::ExternalResolver* resolverForPath( const QString& scriptPath );
QList< Resolver* > resolvers() const;
void addResolver( Resolver* r );
void removeResolver( Resolver* r );

View File

@ -37,6 +37,7 @@
#include "sip/SipPlugin.h"
#include "utils/TomahawkUtilsGui.h"
#include "utils/Logger.h"
#include "Pipeline.h"
#include <QApplication>
#include <QClipboard>
@ -123,6 +124,20 @@ DiagnosticsDialog::updateLogView()
log.append( accountLog( account ) + "\n" );
}
log.append( "RESOLVERS:\n" );
connect( Tomahawk::Pipeline::instance(), SIGNAL( resolverAdded( Tomahawk::Resolver* ) ), SLOT( updateLogView() ), Qt::UniqueConnection );
connect( Tomahawk::Pipeline::instance(), SIGNAL( resolverRemoved( Tomahawk::Resolver* ) ), SLOT( updateLogView() ), Qt::UniqueConnection );
const QList< Tomahawk::Resolver* > resolvers = Tomahawk::Pipeline::instance()->resolvers();
foreach ( Tomahawk::Resolver* resolver, resolvers )
{
log.append( resolver->name() + "\n" );
}
ui->text->setText( log );
}