[vlc-commits] Qt: more of the same simplifications and warnings

Jean-Baptiste Kempf git at videolan.org
Sat May 14 14:31:17 CEST 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat May 14 14:30:41 2011 +0200| [b5386f688349875673ea03f877000fea7a3c8a3a] | committer: Jean-Baptiste Kempf

Qt: more of the same simplifications and warnings

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

 modules/gui/qt4/components/controller.cpp  |    6 +++++-
 modules/gui/qt4/components/open_panels.cpp |    2 +-
 modules/gui/qt4/util/customwidgets.cpp     |    9 +++------
 modules/gui/qt4/util/customwidgets.hpp     |    1 -
 modules/gui/qt4/util/input_slider.cpp      |    8 ++++----
 modules/gui/qt4/util/input_slider.hpp      |    2 +-
 modules/gui/qt4/variables.cpp              |    2 ++
 7 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/modules/gui/qt4/components/controller.cpp b/modules/gui/qt4/components/controller.cpp
index 3de111a..ea8a89a 100644
--- a/modules/gui/qt4/components/controller.cpp
+++ b/modules/gui/qt4/components/controller.cpp
@@ -997,6 +997,8 @@ static int FullscreenControllerWidgetFullscreenChanged( vlc_object_t *vlc_object
                 const char *variable, vlc_value_t old_val,
                 vlc_value_t new_val,  void *data )
 {
+    VLC_UNUSED( variable ); VLC_UNUSED( old_val );
+
     vout_thread_t *p_vout = (vout_thread_t *) vlc_object;
 
     msg_Dbg( p_vout, "Qt4: Fullscreen state changed" );
@@ -1011,6 +1013,8 @@ static int FullscreenControllerWidgetMouseMoved( vlc_object_t *vlc_object, const
                                                  vlc_value_t old_val, vlc_value_t new_val,
                                                  void *data )
 {
+    VLC_UNUSED( variable ); VLC_UNUSED( old_val );
+
     vout_thread_t *p_vout = (vout_thread_t *)vlc_object;
     FullscreenControllerWidget *p_fs = (FullscreenControllerWidget *)data;
 
@@ -1115,7 +1119,7 @@ void FullscreenControllerWidget::fullscreenChanged( vout_thread_t *p_vout,
 /**
  * Mouse change callback (show/hide the controller on mouse movement)
  */
-void FullscreenControllerWidget::mouseChanged( vout_thread_t *p_vout, int i_mousex, int i_mousey )
+void FullscreenControllerWidget::mouseChanged( vout_thread_t *, int i_mousex, int i_mousey )
 {
     bool b_toShow;
 
diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index dec064b..2c4308a 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -667,7 +667,7 @@ void UrlValidator::fixup( QString& str ) const
     str = str.trimmed();
 }
 
-QValidator::State UrlValidator::validate( QString& str, int& pos ) const
+QValidator::State UrlValidator::validate( QString& str, int& ) const
 {
     if( str.contains( ' ' ) )
         return QValidator::Invalid;
diff --git a/modules/gui/qt4/util/customwidgets.cpp b/modules/gui/qt4/util/customwidgets.cpp
index e9e83b0..12f9931 100644
--- a/modules/gui/qt4/util/customwidgets.cpp
+++ b/modules/gui/qt4/util/customwidgets.cpp
@@ -63,7 +63,7 @@ void QElidingLabel::setElideMode( Qt::TextElideMode mode )
     repaint();
 }
 
-void QElidingLabel::paintEvent( QPaintEvent * event )
+void QElidingLabel::paintEvent( QPaintEvent * )
 {
     QPainter p( this );
     int space = frameWidth() + margin();
@@ -409,11 +409,8 @@ SpinningIcon::SpinningIcon( QWidget *parent, bool noIdleFrame )
     setFixedSize( 16, 16 );
 }
 
-SpinningIcon::~SpinningIcon()
-{
-}
-
-QToolButtonExt::QToolButtonExt(QWidget *parent, int ms ): longClick( false )
+QToolButtonExt::QToolButtonExt(QWidget *parent, int ms )
+               :QToolButton( parent ), longClick( false )
 {
     setAutoRepeat( true );
     /* default to twice the doubleclick delay */
diff --git a/modules/gui/qt4/util/customwidgets.hpp b/modules/gui/qt4/util/customwidgets.hpp
index 82bef59..0814ca0 100644
--- a/modules/gui/qt4/util/customwidgets.hpp
+++ b/modules/gui/qt4/util/customwidgets.hpp
@@ -166,7 +166,6 @@ class SpinningIcon : public AnimatedIcon
 
 public:
     SpinningIcon( QWidget *parent, bool noIdleFrame = false );
-    virtual ~SpinningIcon();
 };
 
 /* VLC Key/Wheel hotkeys interactions */
diff --git a/modules/gui/qt4/util/input_slider.cpp b/modules/gui/qt4/util/input_slider.cpp
index d990d9a..5449a93 100644
--- a/modules/gui/qt4/util/input_slider.cpp
+++ b/modules/gui/qt4/util/input_slider.cpp
@@ -72,7 +72,7 @@ SeekSlider::SeekSlider( Qt::Orientation q, QWidget *_parent )
     setPosition( -1.0, 0, 0 );
     secstotimestr( psz_length, 0 );
 
-    CONNECT( this, sliderMoved( int ), this, startSeekTimer( int ) );
+    CONNECT( this, sliderMoved( int ), this, startSeekTimer() );
     CONNECT( seekLimitTimer, timeout(), this, updatePos() );
 
     mTimeTooltip->installEventFilter( this );
@@ -101,7 +101,7 @@ void SeekSlider::setPosition( float pos, int64_t time, int length )
     inputLength = length;
 }
 
-void SeekSlider::startSeekTimer( int new_value )
+void SeekSlider::startSeekTimer()
 {
     /* Only fire one update, when sliding, every 150ms */
     if( b_isSliding && !seekLimitTimer->isActive() )
@@ -176,14 +176,14 @@ void SeekSlider::wheelEvent( QWheelEvent *event )
     event->accept();
 }
 
-void SeekSlider::enterEvent( QEvent *e )
+void SeekSlider::enterEvent( QEvent * )
 {
     /* Don't show the tooltip if the slider is disabled */
     if( isEnabled() && inputLength > 0 )
         mTimeTooltip->show();
 }
 
-void SeekSlider::leaveEvent( QEvent *e )
+void SeekSlider::leaveEvent( QEvent * )
 {
     if( !rect().contains( mapFromGlobal( QCursor::pos() ) ) )
         mTimeTooltip->hide();
diff --git a/modules/gui/qt4/util/input_slider.hpp b/modules/gui/qt4/util/input_slider.hpp
index 13be400..49dcc3d 100644
--- a/modules/gui/qt4/util/input_slider.hpp
+++ b/modules/gui/qt4/util/input_slider.hpp
@@ -71,7 +71,7 @@ public slots:
     void setPosition( float, int64_t, int );
 
 private slots:
-    void startSeekTimer( int );
+    void startSeekTimer();
     void updatePos();
 
 signals:
diff --git a/modules/gui/qt4/variables.cpp b/modules/gui/qt4/variables.cpp
index 36da23b..1200f19 100644
--- a/modules/gui/qt4/variables.cpp
+++ b/modules/gui/qt4/variables.cpp
@@ -48,6 +48,8 @@ QVLCVariable::~QVLCVariable (void)
 int QVLCVariable::callback (vlc_object_t *object, const char *,
                             vlc_value_t old, vlc_value_t cur, void *data)
 {
+    VLC_UNUSED(object);
+
     QVLCVariable *self = static_cast<QVLCVariable *>(data);
 
     self->trigger (self->object, old, cur);



More information about the vlc-commits mailing list