[vlc-commits] Qt: ControlsWidget: fix layout visibility

Francois Cartegnie git at videolan.org
Fri Mar 2 17:36:10 CET 2012


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Mar  2 17:17:05 2012 +0100| [41e0bd599857e6442285f5d0515e8e33af0e3ebe] | committer: Francois Cartegnie

Qt: ControlsWidget: fix layout visibility

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=41e0bd599857e6442285f5d0515e8e33af0e3ebe
---

 modules/gui/qt4/components/controller.cpp |    8 ++++----
 modules/gui/qt4/components/controller.hpp |    5 +++--
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/modules/gui/qt4/components/controller.cpp b/modules/gui/qt4/components/controller.cpp
index ea55de3..8746e1c 100644
--- a/modules/gui/qt4/components/controller.cpp
+++ b/modules/gui/qt4/components/controller.cpp
@@ -109,7 +109,7 @@ void AbstractController::setupButton( QAbstractButton *aButton )
 /* Open the generic config line for the toolbar, parse it
  * and create the widgets accordingly */
 void AbstractController::parseAndCreate( const QString& config,
-                                         QBoxLayout *controlLayout )
+                                         QBoxLayout *newControlLayout )
 {
     QStringList list = config.split( ";", QString::SkipEmptyParts ) ;
     for( int i = 0; i < list.count(); i++ )
@@ -140,12 +140,12 @@ void AbstractController::parseAndCreate( const QString& config,
             }
         }
 
-        createAndAddWidget( controlLayout, -1, i_type, i_option );
+        createAndAddWidget( newControlLayout, -1, i_type, i_option );
     }
 
     if( buttonGroupLayout )
     {
-        controlLayout->addLayout( buttonGroupLayout );
+        newControlLayout->addLayout( buttonGroupLayout );
         buttonGroupLayout = NULL;
     }
 }
@@ -648,7 +648,7 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
     setStyleSheet( "background: red ");
 #endif
     setAttribute( Qt::WA_MacBrushedMetal);
-    QVBoxLayout *controlLayout = new QVBoxLayout( this );
+    controlLayout = new QVBoxLayout( this );
     controlLayout->setContentsMargins( 3, 1, 0, 1 );
     controlLayout->setSpacing( 0 );
     QHBoxLayout *controlLayout1 = new QHBoxLayout;
diff --git a/modules/gui/qt4/components/controller.hpp b/modules/gui/qt4/components/controller.hpp
index 90d9b9c..1df8703 100644
--- a/modules/gui/qt4/components/controller.hpp
+++ b/modules/gui/qt4/components/controller.hpp
@@ -46,8 +46,9 @@ class QPixmap;
 class QLabel;
 
 class QGridLayout;
-class QHBoxLayout;
 class QBoxLayout;
+class QHBoxLayout;
+class QVBoxLayout;
 
 class QAbstractSlider;
 class QAbstractButton;
@@ -165,7 +166,7 @@ protected:
     intf_thread_t       *p_intf;
 
     QSignalMapper       *toolbarActionsMapper;
-    QHBoxLayout         *controlLayout;
+    QBoxLayout          *controlLayout;
     /* Change to BoxLayout if both dir are needed */
 
     AdvControlsWidget   *advControls;



More information about the vlc-commits mailing list