[vlc-commits] commit: Qt: simplify SpeedLabel constructor (Jean-Baptiste Kempf )

git version control git at videolan.org
Tue Mar 2 18:16:42 CET 2010


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Mar  2 11:59:37 2010 +0100| [0900cd7c2459b15ba66746c8a8f2ac20e2d16f7e] | committer: Jean-Baptiste Kempf 

Qt: simplify SpeedLabel constructor

Ref #3368

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

 modules/gui/qt4/components/interface_widgets.cpp |    6 +++---
 modules/gui/qt4/components/interface_widgets.hpp |    2 +-
 modules/gui/qt4/main_interface.cpp               |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index ba5b4a5..058d427 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -412,9 +412,8 @@ void VisualSelector::next()
 }
 #endif
 
-SpeedLabel::SpeedLabel( intf_thread_t *_p_intf, const QString& text,
-                        QWidget *parent )
-           : QLabel( text, parent ), p_intf( _p_intf )
+SpeedLabel::SpeedLabel( intf_thread_t *_p_intf, QWidget *parent )
+           : QLabel( parent ), p_intf( _p_intf )
 {
     setToolTip( qtr( "Current playback speed.\nClick to adjust" ) );
 
@@ -431,6 +430,7 @@ SpeedLabel::SpeedLabel( intf_thread_t *_p_intf, const QString& text,
 
     DCONNECT( THEMIM, inputChanged( input_thread_t * ),
               speedControl, activateOnState() );
+    setRate( INPUT_RATE_DEFAULT );
 }
 
 SpeedLabel::~SpeedLabel()
diff --git a/modules/gui/qt4/components/interface_widgets.hpp b/modules/gui/qt4/components/interface_widgets.hpp
index bda4143..3d57e08 100644
--- a/modules/gui/qt4/components/interface_widgets.hpp
+++ b/modules/gui/qt4/components/interface_widgets.hpp
@@ -162,7 +162,7 @@ class SpeedLabel : public QLabel
 {
     Q_OBJECT
 public:
-    SpeedLabel( intf_thread_t *, const QString&, QWidget * );
+    SpeedLabel( intf_thread_t *, QWidget * );
     virtual ~SpeedLabel();
 
 protected:
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index c7f9940..9756cd5 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -498,7 +498,7 @@ inline void MainInterface::createStatusBar()
     nameLabel = new QLabel( this );
     nameLabel->setTextInteractionFlags( Qt::TextSelectableByMouse
                                       | Qt::TextSelectableByKeyboard );
-    SpeedLabel *speedLabel = new SpeedLabel( p_intf, "1.00x", this );
+    SpeedLabel *speedLabel = new SpeedLabel( p_intf, this );
 
     /* Styling those labels */
     timeLabel->setFrameStyle( QFrame::Sunken | QFrame::Panel );



More information about the vlc-commits mailing list