[vlc-devel] commit: Revert "Qt: deinline createStatusBar() and explicit statusBar creation." and Fix StatusBar - close #2523 ( Jean-Baptiste Kempf )

git version control git at videolan.org
Mon Feb 16 01:26:51 CET 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Feb 16 01:14:20 2009 +0100| [2cbbe8dc00667f5bd2c0601e46a5a402bef17e79] | committer: Jean-Baptiste Kempf 

Revert "Qt: deinline createStatusBar() and explicit statusBar creation." and Fix StatusBar - close #2523

This reverts commit f509b90d14a08b1fb6b4e6584c56e4ce5a6bb086.

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

 modules/gui/qt4/main_interface.cpp |   31 ++++++++++++++++---------------
 modules/gui/qt4/main_interface.hpp |    3 +--
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 0dff96a..ada35f2 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -124,12 +124,22 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     /* Do we want anoying popups or not */
     notificationEnabled = (bool)config_GetInt( p_intf, "qt-notification" );
 
+    /**************
+     * Status Bar *
+     **************/
+    createStatusBar();
+
     /**************************
      *  UI and Widgets design
      **************************/
     setVLCWindowsTitle();
     handleMainUi( settings );
 
+    /************
+     * Menu Bar *
+     ************/
+    QVLCMenu::createMenuBar( this, p_intf, visualSelectorEnabled );
+
 #if 0
     /* Create a Dock to get the playlist */
     dockPL = new QDockWidget( qtr( "Playlist" ), this );
@@ -142,14 +152,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     dockPL->hide();
 #endif
 
-    /**************************
-     * Menu Bar and Status Bar
-     **************************/
-    QVLCMenu::createMenuBar( this, p_intf, visualSelectorEnabled );
-
-    /* StatusBar Creation */
-    setStatusBar( createStatusBar() );
-
     /********************
      * Input Manager    *
      ********************/
@@ -311,14 +313,14 @@ MainInterface::~MainInterface()
  *   Main UI handling        *
  *****************************/
 
-QStatusBar * MainInterface::createStatusBar()
+inline void MainInterface::createStatusBar()
 {
-    QStatusBar *statusBar = new QStatusBar;
-
     /****************
      *  Status Bar  *
      ****************/
     /* Widgets Creation*/
+    QStatusBar *statusBarr = statusBar();
+
     TimeLabel *timeLabel = new TimeLabel( p_intf );
     nameLabel = new QLabel( this );
     nameLabel->setTextInteractionFlags( Qt::TextSelectableByMouse
@@ -331,16 +333,15 @@ QStatusBar * MainInterface::createStatusBar()
     nameLabel->setFrameStyle( QFrame::Sunken | QFrame::StyledPanel);
 
     /* and adding those */
-    statusBar->addWidget( nameLabel, 8 );
-    statusBar->addPermanentWidget( speedLabel, 0 );
-    statusBar->addPermanentWidget( timeLabel, 0 );
+    statusBarr->addWidget( nameLabel, 8 );
+    statusBarr->addPermanentWidget( speedLabel, 0 );
+    statusBarr->addPermanentWidget( timeLabel, 0 );
 
     /* timeLabel behaviour:
        - double clicking opens the goto time dialog
        - right-clicking and clicking just toggle between remaining and
          elapsed time.*/
     CONNECT( timeLabel, timeLabelDoubleClicked(), THEDP, gotoTimeDialog() );
-    return statusBar;
 }
 
 inline void MainInterface::initSystray()
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index 8528171..95e0a78 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -49,7 +49,6 @@ class FullscreenControllerWidget;
 class SpeedControlWidget;
 class QMenu;
 class QSize;
-class QStatusBar;
 
 enum {
     CONTROLS_HIDDEN = 0x0,
@@ -118,7 +117,7 @@ private:
     void createSystray();
     void initSystray();
 
-    QStatusBar * createStatusBar();
+    void createStatusBar();
 
     /* Video */
     VideoWidget         *videoWidget;




More information about the vlc-devel mailing list