Commit f06973e4 authored by Rémi Duraffort's avatar Rémi Duraffort Committed by Jean-Baptiste Kempf

Fix a BIG memleak in Qt interface (this poor object was missing his parent).

(cherry picked from commit 8cebd56a)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 9b2461d1
...@@ -1272,7 +1272,7 @@ void QVLCMenu::CreateAndConnect( QMenu *menu, const char *psz_var, ...@@ -1272,7 +1272,7 @@ void QVLCMenu::CreateAndConnect( QMenu *menu, const char *psz_var,
action->setChecked( checked ); action->setChecked( checked );
MenuItemData *itemData = new MenuItemData( i_object_id, i_val_type, MenuItemData *itemData = new MenuItemData( THEDP->menusMapper, i_object_id, i_val_type,
val, psz_var ); val, psz_var );
CONNECT( action, triggered(), THEDP->menusMapper, map() ); CONNECT( action, triggered(), THEDP->menusMapper, map() );
THEDP->menusMapper->setMapping( action, itemData ); THEDP->menusMapper->setMapping( action, itemData );
......
...@@ -50,7 +50,7 @@ class MenuItemData : public QObject ...@@ -50,7 +50,7 @@ class MenuItemData : public QObject
Q_OBJECT Q_OBJECT
public: public:
MenuItemData( int i_id, int _i_type, vlc_value_t _val, const char *_var ) MenuItemData( QObject* parent, int i_id, int _i_type, vlc_value_t _val, const char *_var ) : QObject( parent )
{ {
i_object_id = i_id; i_object_id = i_id;
i_val_type = _i_type; i_val_type = _i_type;
......
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