[vlc-commits] commit: Qt4: don't create multiple playlist models (Ilkka Ollakka )
git at videolan.org
git at videolan.org
Tue Oct 26 18:08:46 CEST 2010
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Tue Oct 26 19:04:06 2010 +0300| [eac9464c4028d25c81da0af793568a581088580a] | committer: Ilkka Ollakka
Qt4: don't create multiple playlist models
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eac9464c4028d25c81da0af793568a581088580a
---
modules/gui/qt4/components/playlist/playlist.cpp | 2 +-
.../gui/qt4/components/playlist/standardpanel.cpp | 6 ++++--
.../gui/qt4/components/playlist/standardpanel.hpp | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/modules/gui/qt4/components/playlist/playlist.cpp b/modules/gui/qt4/components/playlist/playlist.cpp
index 144146f..7be186c 100644
--- a/modules/gui/qt4/components/playlist/playlist.cpp
+++ b/modules/gui/qt4/components/playlist/playlist.cpp
@@ -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 );
diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp
index a3c87eb..13cf01d 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.cpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.cpp
@@ -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;
diff --git a/modules/gui/qt4/components/playlist/standardpanel.hpp b/modules/gui/qt4/components/playlist/standardpanel.hpp
index 4426292..f8c49fc 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.hpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.hpp
@@ -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;
More information about the vlc-commits
mailing list