Commit 05b30079 authored by Hannes Domani's avatar Hannes Domani Committed by Jean-Baptiste Kempf

Qt: break circular ownership at destruction

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 1c3e3a54
......@@ -486,7 +486,7 @@ SpeedLabel::SpeedLabel( intf_thread_t *_p_intf, QWidget *parent )
speedControl = new SpeedControlWidget( p_intf, this );
speedControlMenu = new QMenu( this );
QWidgetAction *widgetAction = new QWidgetAction( speedControl );
widgetAction = new QWidgetAction( speedControl );
widgetAction->setDefaultWidget( speedControl );
speedControlMenu->addAction( widgetAction );
......@@ -502,6 +502,7 @@ SpeedLabel::SpeedLabel( intf_thread_t *_p_intf, QWidget *parent )
SpeedLabel::~SpeedLabel()
{
widgetAction->setParent( this );
delete speedControlMenu;
}
......
......@@ -47,6 +47,7 @@
class QMenu;
class QSlider;
class QWidgetAction;
class SpeedControlWidget;
struct vout_window_t;
......@@ -232,6 +233,7 @@ private:
QMenu *speedControlMenu;
QString tooltipStringPattern;
SpeedControlWidget *speedControl;
QWidgetAction *widgetAction;
};
/******************** Speed Control Widgets ****************/
......
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