diff widgets/PluginParameterDialog.h @ 1592:1da52d5e6700

Merge from branch audio-source-refactor. Mostly handling changes to plugin ownership
author Chris Cannam
date Fri, 03 Apr 2020 12:12:47 +0100
parents 11660e0c896f
children 7eb595837eaa
line wrap: on
line diff
--- a/widgets/PluginParameterDialog.h	Fri Apr 03 11:35:40 2020 +0100
+++ b/widgets/PluginParameterDialog.h	Fri Apr 03 12:12:47 2020 +0100
@@ -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;