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:
@@ -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";
|
||||||
|
@@ -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 );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user