1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-12 00:54:20 +02:00

Move ScriptPlugin initialization to own factory method

This commit is contained in:
Dominik Schmidt
2014-12-09 00:20:27 +01:00
parent 2890190c82
commit fa832e3a36
2 changed files with 9 additions and 0 deletions

View File

@@ -84,6 +84,13 @@ ScriptAccount::registerScriptPlugin( const QString& type, const QString& objectI
m_objects.insert( objectId, object ); m_objects.insert( objectId, object );
} }
scriptPluginFactory( type, object );
}
void
ScriptAccount::scriptPluginFactory( const QString& type, ScriptObject* object )
{
if ( type == "linkGenerator" ) if ( type == "linkGenerator" )
{ {
tLog() << "Got link generator plugin"; tLog() << "Got link generator plugin";

View File

@@ -47,6 +47,8 @@ public:
void reportScriptJobResult( const QVariantMap& result ); void reportScriptJobResult( const QVariantMap& result );
void registerScriptPlugin( const QString& type, const QString& objectId ); void registerScriptPlugin( const QString& type, const QString& objectId );
virtual void scriptPluginFactory( const QString& type, ScriptObject* object );
private slots: private slots:
void onJobDeleted( const QString& jobId ); void onJobDeleted( const QString& jobId );