Commit eac9464c authored by Ilkka Ollakka's avatar Ilkka Ollakka

Qt4: don't create multiple playlist models

parent db8c66ce
......@@ -90,7 +90,7 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
setMinimumWidth( 300 );
PLModel *model = new PLModel( p_playlist, p_intf, p_root, this );
mainView = new StandardPLPanel( this, p_intf, THEPL, p_root, selector );
mainView = new StandardPLPanel( this, p_intf, THEPL, p_root, selector, model );
/* Location Bar */
locationBar = new LocationBar( model );
......
......@@ -59,7 +59,9 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
intf_thread_t *_p_intf,
playlist_t *p_playlist,
playlist_item_t *p_root,
PLSelector *_p_selector ):
PLSelector *_p_selector,
PLModel *_p_model
):
QWidget( _parent ), p_intf( _p_intf ),
p_selector( _p_selector )
{
......@@ -73,7 +75,7 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
viewStack = new QStackedLayout();
layout->addLayout( viewStack, 1, 0, 1, -1 );
model = new PLModel( p_playlist, p_intf, p_root, this );
model = _p_model;
currentRootId = -1;
currentRootIndexId = -1;
lastActivatedId = -1;
......
......@@ -59,7 +59,7 @@ class StandardPLPanel: public QWidget
public:
StandardPLPanel( PlaylistWidget *, intf_thread_t *,
playlist_t *, playlist_item_t *, PLSelector * );
playlist_t *, playlist_item_t *, PLSelector *, PLModel * );
virtual ~StandardPLPanel();
protected:
friend class PlaylistWidget;
......
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