]> git.sesse.net Git - vlc/commitdiff
Qt: deinline createStatusBar() and explicit statusBar creation.
authorJean-Baptiste Kempf <jb@videolan.org>
Fri, 13 Feb 2009 10:10:09 +0000 (11:10 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 13 Feb 2009 10:10:35 +0000 (11:10 +0100)
No feature change.

modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.hpp

index eb5b7ede415f855062553d420bd4f8a6f53b7012..e7dfb1ef2e2c9ec1a378441d4ab7a7cacba49b6e 100644 (file)
@@ -148,7 +148,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     QVLCMenu::createMenuBar( this, p_intf, visualSelectorEnabled );
 
     /* StatusBar Creation */
-    createStatusBar();
+    setStatusBar( createStatusBar() );
 
     /********************
      * Input Manager    *
@@ -311,8 +311,10 @@ MainInterface::~MainInterface()
  *   Main UI handling        *
  *****************************/
 
-inline void MainInterface::createStatusBar()
+QStatusBar * MainInterface::createStatusBar()
 {
+    QStatusBar *statusBar = new QStatusBar;
+
     /****************
      *  Status Bar  *
      ****************/
@@ -329,15 +331,16 @@ inline void MainInterface::createStatusBar()
     nameLabel->setFrameStyle( QFrame::Sunken | QFrame::StyledPanel);
 
     /* and adding those */
-    statusBar()->addWidget( nameLabel, 8 );
-    statusBar()->addPermanentWidget( speedLabel, 0 );
-    statusBar()->addPermanentWidget( timeLabel, 0 );
+    statusBar->addWidget( nameLabel, 8 );
+    statusBar->addPermanentWidget( speedLabel, 0 );
+    statusBar->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()
index 95e0a787a81ca1b0a18dac145cb602df3c4c2eee..8528171200feb7414cb903a3fc3fd1197aaf9d3f 100644 (file)
@@ -49,6 +49,7 @@ class FullscreenControllerWidget;
 class SpeedControlWidget;
 class QMenu;
 class QSize;
+class QStatusBar;
 
 enum {
     CONTROLS_HIDDEN = 0x0,
@@ -117,7 +118,7 @@ private:
     void createSystray();
     void initSystray();
 
-    void createStatusBar();
+    QStatusBar * createStatusBar();
 
     /* Video */
     VideoWidget         *videoWidget;