Remove destructor from OBSPropertiesView
This commit is contained in:
parent
94a93abb2b
commit
7c0018d4bc
@ -58,7 +58,7 @@ void OBSPropertiesView::RefreshProperties()
|
||||
layout->setSizeConstraint(QLayout::SetMaximumSize);
|
||||
layout->setLabelAlignment(Qt::AlignRight);
|
||||
|
||||
obs_property_t *property = obs_properties_first(properties);
|
||||
obs_property_t *property = obs_properties_first(properties.get());
|
||||
|
||||
while (property) {
|
||||
AddProperty(property, layout);
|
||||
@ -81,7 +81,7 @@ OBSPropertiesView::OBSPropertiesView(OBSData settings_,
|
||||
PropertiesUpdateCallback callback_, int minSize_)
|
||||
: QScrollArea (nullptr),
|
||||
widget (nullptr),
|
||||
properties (properties_),
|
||||
properties (properties_, obs_properties_destroy),
|
||||
settings (settings_),
|
||||
obj (obj_),
|
||||
callback (callback_),
|
||||
|
@ -48,9 +48,13 @@ class OBSPropertiesView : public QScrollArea {
|
||||
|
||||
friend class WidgetInfo;
|
||||
|
||||
using properties_delete_t = decltype(&obs_properties_destroy);
|
||||
using properties_t =
|
||||
std::unique_ptr<obs_properties_t, properties_delete_t>;
|
||||
|
||||
private:
|
||||
QWidget *widget;
|
||||
obs_properties_t *properties;
|
||||
properties_t properties;
|
||||
OBSData settings;
|
||||
void *obj;
|
||||
PropertiesUpdateCallback callback;
|
||||
@ -87,9 +91,4 @@ public:
|
||||
obs_properties_t *properties,
|
||||
void *obj, PropertiesUpdateCallback callback,
|
||||
int minSize = 0);
|
||||
|
||||
inline ~OBSPropertiesView()
|
||||
{
|
||||
obs_properties_destroy(properties);
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user