Commit 3d951077 authored by Martin Heistermann's avatar Martin Heistermann

Handle script object lifetime - delete it when the widget is gone.

parent b8f8a6eb
......@@ -8,12 +8,14 @@ ScriptSettingsDouble::ScriptSettingsDouble()
ScriptSettingsDouble::ScriptSettingsDouble(
DoubleWidget *widget)
: widget_(widget)
{}
{
connect(widget_, &QWidget::destroyed,
this, &QObject::deleteLater);
}
ScriptSettingsDouble::ScriptSettingsDouble(
const ScriptSettingsDouble &other)
: QObject(),
widget_(other.widget_)
: ScriptSettingsDouble(other.widget_)
{}
ScriptSettingsDouble::~ScriptSettingsDouble()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment