mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-19 15:29:42 +01:00
* Bit of spring cleanup.
This commit is contained in:
parent
29239e08d3
commit
6c8550bf64
@ -79,8 +79,9 @@ ScriptResolver::~ScriptResolver()
|
||||
delete m_configWidget.data();
|
||||
}
|
||||
|
||||
|
||||
Tomahawk::ExternalResolver*
|
||||
ScriptResolver::factory(const QString& exe)
|
||||
ScriptResolver::factory( const QString& exe )
|
||||
{
|
||||
ExternalResolver* res = 0;
|
||||
|
||||
@ -151,18 +152,21 @@ ScriptResolver::reload()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
ScriptResolver::running() const
|
||||
{
|
||||
return !m_stopped;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ScriptResolver::readStderr()
|
||||
{
|
||||
tLog() << "SCRIPT_STDERR" << filePath() << m_proc.readAllStandardError();
|
||||
}
|
||||
|
||||
|
||||
ScriptResolver::ErrorState
|
||||
ScriptResolver::error() const
|
||||
{
|
||||
|
@ -40,6 +40,7 @@ ResolversModel::~ResolversModel()
|
||||
|
||||
}
|
||||
|
||||
|
||||
QVariant
|
||||
ResolversModel::data( const QModelIndex& index, int role ) const
|
||||
{
|
||||
@ -67,6 +68,7 @@ ResolversModel::data( const QModelIndex& index, int role ) const
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
ResolversModel::setData( const QModelIndex& index, const QVariant& value, int role )
|
||||
{
|
||||
@ -112,6 +114,7 @@ ResolversModel::rowCount( const QModelIndex& parent ) const
|
||||
return Tomahawk::Pipeline::instance()->scriptResolvers().count();
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ResolversModel::columnCount(const QModelIndex& parent) const
|
||||
{
|
||||
@ -119,6 +122,7 @@ ResolversModel::columnCount(const QModelIndex& parent) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Qt::ItemFlags
|
||||
ResolversModel::flags( const QModelIndex& index ) const
|
||||
{
|
||||
@ -141,6 +145,7 @@ ResolversModel::addResolver( const QString& resolver, bool enable )
|
||||
m_waitingForLoad << resolver;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ResolversModel::atticaResolverInstalled( const QString& resolverId )
|
||||
{
|
||||
@ -170,6 +175,7 @@ ResolversModel::removeResolver( const QString& resolver )
|
||||
endRemoveRows();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ResolversModel::resolverChanged()
|
||||
{
|
||||
@ -190,6 +196,7 @@ ResolversModel::resolverChanged()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ResolversModel::addInstalledResolvers()
|
||||
{
|
||||
@ -203,7 +210,7 @@ ResolversModel::addInstalledResolvers()
|
||||
lib64Dir.cdUp();
|
||||
lib64Dir.cd( "lib64" );
|
||||
|
||||
pluginDirs << appDir << libDir << lib64Dir << libexecDir << QDir( qApp->applicationDirPath() );
|
||||
pluginDirs << appDir << libDir << lib64Dir << libexecDir;
|
||||
foreach ( const QDir& pluginDir, pluginDirs )
|
||||
{
|
||||
qDebug() << "Checking directory for resolvers:" << pluginDir;
|
||||
@ -224,6 +231,7 @@ ResolversModel::addInstalledResolvers()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ResolversModel::saveScriptResolvers()
|
||||
{
|
||||
|
@ -170,14 +170,13 @@ TomahawkApp::init()
|
||||
// init pipeline and resolver factories
|
||||
new Pipeline( this );
|
||||
|
||||
#ifndef ENABLE_HEADLESS
|
||||
Pipeline::instance()->addExternalResolverFactory( boost::bind( &QtScriptResolver::factory, _1 ) );
|
||||
Pipeline::instance()->addExternalResolverFactory( boost::bind( &ScriptResolver::factory, _1 ) );
|
||||
#ifndef ENABLE_HEADLESS
|
||||
Pipeline::instance()->addExternalResolverFactory( boost::bind( &QtScriptResolver::factory, _1 ) );
|
||||
Pipeline::instance()->addExternalResolverFactory( boost::bind( &ScriptResolver::factory, _1 ) );
|
||||
|
||||
|
||||
new ActionCollection( this );
|
||||
connect( ActionCollection::instance()->getAction( "quit" ), SIGNAL( triggered() ), SLOT( quit() ), Qt::UniqueConnection );
|
||||
#endif
|
||||
new ActionCollection( this );
|
||||
connect( ActionCollection::instance()->getAction( "quit" ), SIGNAL( triggered() ), SLOT( quit() ), Qt::UniqueConnection );
|
||||
#endif
|
||||
|
||||
m_servent = QWeakPointer<Servent>( new Servent( this ) );
|
||||
connect( m_servent.data(), SIGNAL( ready() ), SLOT( initSIP() ) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user