Mercurial > hg > svgui
diff widgets/PluginParameterDialog.h @ 1581:11660e0c896f audio-source-refactor
Use shared_ptr for plugin instances throughout; also descriptors are copyable
author | Chris Cannam |
---|---|
date | Fri, 20 Mar 2020 16:31:23 +0000 |
parents | 05d614f6e46d |
children | 7eb595837eaa |
line wrap: on
line diff
--- a/widgets/PluginParameterDialog.h Fri Jan 24 15:11:08 2020 +0000 +++ b/widgets/PluginParameterDialog.h Fri Mar 20 16:31:23 2020 +0000 @@ -43,7 +43,8 @@ Q_OBJECT public: - PluginParameterDialog(Vamp::PluginBase *, QWidget *parent = 0); + PluginParameterDialog(std::shared_ptr<Vamp::PluginBase> plugin, + QWidget *parent = 0); ~PluginParameterDialog(); void setChannelArrangement(int sourceChannels, @@ -61,7 +62,7 @@ QString defaultName); void setShowSelectionOnlyOption(bool show); - Vamp::PluginBase *getPlugin() { return m_plugin; } + std::shared_ptr<Vamp::PluginBase> getPlugin() { return m_plugin; } int getChannel() const { return m_channel; } @@ -93,7 +94,7 @@ void dialogAccepted(); protected: - Vamp::PluginBase *m_plugin; + std::shared_ptr<Vamp::PluginBase> m_plugin; int m_channel; int m_stepSize;