diff --git a/include/Plugin.h b/include/Plugin.h index 1c8421e59..783437bcc 100644 --- a/include/Plugin.h +++ b/include/Plugin.h @@ -133,11 +133,12 @@ public: { } - virtual void fillDescriptionWidget( QWidget *, const Key * ) + virtual void fillDescriptionWidget( QWidget *, const Key * ) const { } - virtual void listSubPluginKeys( Plugin::Descriptor *, KeyList & ) + virtual void listSubPluginKeys( const Plugin::Descriptor *, + KeyList & ) const { } diff --git a/plugins/ladspa_effect/LadspaSubPluginFeatures.cpp b/plugins/ladspa_effect/LadspaSubPluginFeatures.cpp index fd43021df..bb6cba447 100644 --- a/plugins/ladspa_effect/LadspaSubPluginFeatures.cpp +++ b/plugins/ladspa_effect/LadspaSubPluginFeatures.cpp @@ -25,7 +25,6 @@ * */ - #include #include @@ -46,7 +45,7 @@ LadspaSubPluginFeatures::LadspaSubPluginFeatures( Plugin::PluginTypes _type ) : void LadspaSubPluginFeatures::fillDescriptionWidget( QWidget * _parent, - const Key * _key ) + const Key * _key ) const { const ladspa_key_t & lkey = subPluginKeyToLadspaKey( _key ); ladspa2LMMS * lm = engine::getLADSPAManager(); @@ -114,8 +113,8 @@ void LadspaSubPluginFeatures::fillDescriptionWidget( QWidget * _parent, -void LadspaSubPluginFeatures::listSubPluginKeys( Plugin::Descriptor * _desc, - KeyList & _kl ) +void LadspaSubPluginFeatures::listSubPluginKeys( + const Plugin::Descriptor * _desc, KeyList & _kl ) const { ladspa2LMMS * lm = engine::getLADSPAManager(); diff --git a/plugins/ladspa_effect/LadspaSubPluginFeatures.h b/plugins/ladspa_effect/LadspaSubPluginFeatures.h index d2e0ef594..05729e6cb 100644 --- a/plugins/ladspa_effect/LadspaSubPluginFeatures.h +++ b/plugins/ladspa_effect/LadspaSubPluginFeatures.h @@ -25,7 +25,6 @@ * */ - #ifndef _LADSPA_SUBPLUGIN_FEATURES_H #define _LADSPA_SUBPLUGIN_FEATURES_H @@ -38,9 +37,11 @@ class LadspaSubPluginFeatures : public Plugin::Descriptor::SubPluginFeatures public: LadspaSubPluginFeatures( Plugin::PluginTypes _type ); - virtual void fillDescriptionWidget( QWidget * _parent, const Key * _key ); + virtual void fillDescriptionWidget( QWidget * _parent, + const Key * _key ) const; - virtual void listSubPluginKeys( Plugin::Descriptor * _desc, KeyList & _kl ); + virtual void listSubPluginKeys( const Plugin::Descriptor * _desc, + KeyList & _kl ) const; static ladspa_key_t subPluginKeyToLadspaKey( const Key * _key ); diff --git a/plugins/vst_effect/VstSubPluginFeatures.cpp b/plugins/vst_effect/VstSubPluginFeatures.cpp index 3b89d7691..9052827cf 100644 --- a/plugins/vst_effect/VstSubPluginFeatures.cpp +++ b/plugins/vst_effect/VstSubPluginFeatures.cpp @@ -40,18 +40,17 @@ VstSubPluginFeatures::VstSubPluginFeatures( Plugin::PluginTypes _type ) : void VstSubPluginFeatures::fillDescriptionWidget( QWidget * _parent, - const Key * _key ) + const Key * _key ) const { new QLabel( QWidget::tr( "Name: " ) + _key->name, _parent ); - new QLabel( QWidget::tr( "File: " ) + _key->attributes["file"], - _parent ); + new QLabel( QWidget::tr( "File: " ) + _key->attributes["file"], _parent ); } -void VstSubPluginFeatures::listSubPluginKeys( Plugin::Descriptor * _desc, - KeyList & _kl ) +void VstSubPluginFeatures::listSubPluginKeys( const Plugin::Descriptor * _desc, + KeyList & _kl ) const { QStringList dlls = QDir( configManager::inst()->vstDir() ). entryList( QStringList() << "*.dll", @@ -64,6 +63,5 @@ void VstSubPluginFeatures::listSubPluginKeys( Plugin::Descriptor * _desc, am["file"] = *it; _kl.push_back( Key( _desc, QFileInfo( *it ).baseName(), am ) ); } - } diff --git a/plugins/vst_effect/VstSubPluginFeatures.h b/plugins/vst_effect/VstSubPluginFeatures.h index 0f1377427..62856122e 100644 --- a/plugins/vst_effect/VstSubPluginFeatures.h +++ b/plugins/vst_effect/VstSubPluginFeatures.h @@ -35,9 +35,11 @@ class VstSubPluginFeatures : public Plugin::Descriptor::SubPluginFeatures public: VstSubPluginFeatures( Plugin::PluginTypes _type ); - virtual void fillDescriptionWidget( QWidget * _parent, const Key * _key ); + virtual void fillDescriptionWidget( QWidget * _parent, + const Key * _key ) const; - virtual void listSubPluginKeys( Plugin::Descriptor * _desc, KeyList & _kl ); + virtual void listSubPluginKeys( const Plugin::Descriptor * _desc, + KeyList & _kl ) const; } ;