[vlmc-devel] commit: MediaListView: Parenting widgets correctly. (Hugo Beauzee-Luyssen )

git at videolan.org git at videolan.org
Thu Mar 25 11:06:56 CET 2010


vlmc | branch: master | Hugo Beauzee-Luyssen <beauze.h at gmail.com> | Thu Mar 25 10:20:34 2010 +0100| [fc3cc25f652eb8cc7159a25bff616b36092fff75] | committer: Hugo Beauzee-Luyssen 

MediaListView: Parenting widgets correctly.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=fc3cc25f652eb8cc7159a25bff616b36092fff75
---

 src/Gui/library/ListViewController.cpp |    3 ++-
 src/Gui/library/ListViewController.h   |    3 +--
 src/Gui/library/MediaListView.cpp      |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/Gui/library/ListViewController.cpp b/src/Gui/library/ListViewController.cpp
index 5411f0e..2c746fa 100644
--- a/src/Gui/library/ListViewController.cpp
+++ b/src/Gui/library/ListViewController.cpp
@@ -27,13 +27,14 @@
 #include "ListViewController.h"
 #include "MediaCellView.h"
 #include "Library.h"
+#include "StackViewController.h"
 
 ListViewController::ListViewController( StackViewController* nav ) : m_nav( nav )
 {
     m_title      = tr( "Media List" );
     m_scrollArea = new QScrollArea();
     m_layout     = new QVBoxLayout();
-    m_container  = new QWidget();
+    m_container  = new QWidget( nav );
 
     m_layout->setAlignment( Qt::AlignTop );
     m_layout->setSpacing( 0 );
diff --git a/src/Gui/library/ListViewController.h b/src/Gui/library/ListViewController.h
index 5a79015..72c0ce8 100644
--- a/src/Gui/library/ListViewController.h
+++ b/src/Gui/library/ListViewController.h
@@ -37,7 +37,6 @@ class ListViewController : public ViewController
     Q_OBJECT
 
 public:
-    ListViewController() {}
     ListViewController( StackViewController* nav );
     ~ListViewController();
 
@@ -48,11 +47,11 @@ public:
 
 protected:
     QVBoxLayout*                m_layout;
+    QWidget*                    m_container;
 
 private:
     QString                     m_title;
     QScrollArea*                m_scrollArea;
-    QWidget*                    m_container;
 
     StackViewController*        m_nav;
 };
diff --git a/src/Gui/library/MediaListView.cpp b/src/Gui/library/MediaListView.cpp
index 76f1c44..e62b7de 100644
--- a/src/Gui/library/MediaListView.cpp
+++ b/src/Gui/library/MediaListView.cpp
@@ -52,7 +52,7 @@ MediaListView::~MediaListView()
 
 void        MediaListView::newClipLoaded( Clip *clip )
 {
-    MediaCellView* cell = new MediaCellView( clip );
+    MediaCellView* cell = new MediaCellView( clip, m_container );
 
     connect( cell, SIGNAL ( cellSelected( QUuid ) ),
              this, SLOT ( cellSelection( QUuid ) ) );



More information about the Vlmc-devel mailing list