Commit 8cebd56a authored by Rémi Duraffort's avatar Rémi Duraffort

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

parent 0acaf968
......@@ -1267,7 +1267,7 @@ void QVLCMenu::CreateAndConnect( QMenu *menu, const char *psz_var,
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 );
CONNECT( action, triggered(), THEDP->menusMapper, map() );
THEDP->menusMapper->setMapping( action, itemData );
......
......@@ -50,7 +50,7 @@ class MenuItemData : public QObject
Q_OBJECT
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_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