diff --git a/include/DummyEffect.h b/include/DummyEffect.h index 30d267cce..6c2f31a26 100644 --- a/include/DummyEffect.h +++ b/include/DummyEffect.h @@ -87,6 +87,7 @@ public: m_controls( this ), m_originalPluginData( originalPluginData ) { + setName(); } virtual ~DummyEffect() @@ -113,7 +114,28 @@ public: private: DummyEffectControls m_controls; const QDomElement m_originalPluginData; + + // Parse the display name from the dom + virtual void setName() + { + QDomNodeList keys = originalPluginData().elementsByTagName( "key" ); + for( int i = 0; !keys.item( i ).isNull(); ++i ) + { + QDomNodeList attributes = keys.item( i ).toElement().elementsByTagName( "attribute" ); + for( int j = 0; !attributes.item( j ).isNull(); ++j ) + { + QDomElement attribute = attributes.item( j ).toElement(); + if( attribute.hasAttribute( "value" ) ) + { + QString name = tr("NOT FOUND") + " (" + attribute.attribute( "value" ) + ")"; + setDisplayName(name); + return; + } + } + + } + } } ;