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