[vlc-commits] Qt: remove unused variable callback parameters
Rémi Denis-Courmont
git at videolan.org
Mon Jul 25 22:26:40 CEST 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jul 25 23:17:55 2016 +0300| [f79e9f5755547d4eb9d64abc655eb9d5d0e0975e] | committer: Jean-Baptiste Kempf
Qt: remove unused variable callback parameters
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f79e9f5755547d4eb9d64abc655eb9d5d0e0975e
---
modules/gui/qt/adapters/variables.cpp | 6 ++---
modules/gui/qt/components/controller.cpp | 18 +++++----------
modules/gui/qt/input_manager.cpp | 38 ++++++++++++--------------------
modules/gui/qt/main_interface.cpp | 27 +++++++----------------
4 files changed, 30 insertions(+), 59 deletions(-)
diff --git a/modules/gui/qt/adapters/variables.cpp b/modules/gui/qt/adapters/variables.cpp
index 9868806..6ef90ce 100644
--- a/modules/gui/qt/adapters/variables.cpp
+++ b/modules/gui/qt/adapters/variables.cpp
@@ -45,11 +45,9 @@ QVLCVariable::~QVLCVariable (void)
vlc_object_release (object);
}
-int QVLCVariable::callback (vlc_object_t *object, const char *,
- vlc_value_t old, vlc_value_t cur, void *data)
+int QVLCVariable::callback(vlc_object_t *, const char *,
+ vlc_value_t old, vlc_value_t cur, void *data)
{
- VLC_UNUSED(object);
-
QVLCVariable *self = static_cast<QVLCVariable *>(data);
self->trigger (old, cur);
diff --git a/modules/gui/qt/components/controller.cpp b/modules/gui/qt/components/controller.cpp
index c846f25..98b594e 100644
--- a/modules/gui/qt/components/controller.cpp
+++ b/modules/gui/qt/components/controller.cpp
@@ -1116,13 +1116,10 @@ void FullscreenControllerWidget::keyPressEvent( QKeyEvent *event )
}
/* */
-static int FullscreenControllerWidgetFullscreenChanged( vlc_object_t *vlc_object,
- const char *variable, vlc_value_t old_val,
- vlc_value_t new_val, void *data )
+static int FullscreenControllerWidgetFullscreenChanged( vlc_object_t *obj,
+ const char *, vlc_value_t, vlc_value_t new_val, void *data )
{
- VLC_UNUSED( variable ); VLC_UNUSED( old_val );
-
- vout_thread_t *p_vout = (vout_thread_t *) vlc_object;
+ vout_thread_t *p_vout = (vout_thread_t *) obj;
msg_Dbg( p_vout, "Qt: Fullscreen state changed" );
FullscreenControllerWidget *p_fs = (FullscreenControllerWidget *)data;
@@ -1132,13 +1129,10 @@ static int FullscreenControllerWidgetFullscreenChanged( vlc_object_t *vlc_object
return VLC_SUCCESS;
}
/* */
-static int FullscreenControllerWidgetMouseMoved( vlc_object_t *vlc_object, const char *variable,
- vlc_value_t old_val, vlc_value_t new_val,
- void *data )
+static int FullscreenControllerWidgetMouseMoved( vlc_object_t *obj,
+ const char *, vlc_value_t, vlc_value_t new_val, void *data )
{
- VLC_UNUSED( variable ); VLC_UNUSED( old_val );
-
- vout_thread_t *p_vout = (vout_thread_t *)vlc_object;
+ vout_thread_t *p_vout = (vout_thread_t *) obj;
FullscreenControllerWidget *p_fs = (FullscreenControllerWidget *)data;
/* Get the value from the Vout - Trust the vout more than Qt */
diff --git a/modules/gui/qt/input_manager.cpp b/modules/gui/qt/input_manager.cpp
index 14f81b8..82082c1 100644
--- a/modules/gui/qt/input_manager.cpp
+++ b/modules/gui/qt/input_manager.cpp
@@ -318,24 +318,20 @@ inline void InputManager::delCallbacks()
}
/* Static callbacks for IM */
-int MainInputManager::ItemChanged( vlc_object_t *p_this, const char *psz_var,
- vlc_value_t oldval, vlc_value_t newval, void *param )
+int MainInputManager::ItemChanged( vlc_object_t *, const char *,
+ vlc_value_t, vlc_value_t val, void *param )
{
- VLC_UNUSED( p_this ); VLC_UNUSED( psz_var ); VLC_UNUSED( oldval );
-
InputManager *im = (InputManager*)param;
- input_item_t *p_item = static_cast<input_item_t *>(newval.p_address);
+ input_item_t *p_item = static_cast<input_item_t *>(val.p_address);
IMEvent *event = new IMEvent( IMEvent::ItemChanged, p_item );
QApplication::postEvent( im, event );
return VLC_SUCCESS;
}
-static int InputEvent( vlc_object_t *p_this, const char *,
+static int InputEvent( vlc_object_t *, const char *,
vlc_value_t, vlc_value_t newval, void *param )
{
- VLC_UNUSED( p_this );
-
InputManager *im = (InputManager*)param;
IMEvent *event;
@@ -1189,12 +1185,9 @@ bool MainInputManager::hasEmptyPlaylist()
/****************************
* Static callbacks for MIM *
****************************/
-int MainInputManager::PLItemChanged( vlc_object_t *p_this, const char *psz_var,
- vlc_value_t oldval, vlc_value_t val, void *param )
+int MainInputManager::PLItemChanged( vlc_object_t *, const char *,
+ vlc_value_t, vlc_value_t, void *param )
{
- VLC_UNUSED( p_this ); VLC_UNUSED( psz_var ); VLC_UNUSED( oldval );
- VLC_UNUSED( val );
-
MainInputManager *mim = (MainInputManager*)param;
IMEvent *event = new IMEvent( IMEvent::ItemChanged );
@@ -1202,13 +1195,12 @@ int MainInputManager::PLItemChanged( vlc_object_t *p_this, const char *psz_var,
return VLC_SUCCESS;
}
-int MainInputManager::LeafToParent( vlc_object_t *p_this, const char *psz_var,
- vlc_value_t oldval, vlc_value_t newval, void *param )
+int MainInputManager::LeafToParent( vlc_object_t *, const char *,
+ vlc_value_t, vlc_value_t val, void *param )
{
- VLC_UNUSED( p_this ); VLC_UNUSED( psz_var ); VLC_UNUSED( oldval );
MainInputManager *mim = (MainInputManager*)param;
- PLEvent *event = new PLEvent( PLEvent::LeafToParent, newval.i_int );
+ PLEvent *event = new PLEvent( PLEvent::LeafToParent, val.i_int );
QApplication::postEvent( mim, event );
return VLC_SUCCESS;
@@ -1235,10 +1227,10 @@ void MainInputManager::menusUpdateAudio( const QString& data )
}
}
-int MainInputManager::PLItemAppended
-( vlc_object_t * obj, const char *var, vlc_value_t old, vlc_value_t cur, void *data )
+int MainInputManager::PLItemAppended( vlc_object_t *, const char *,
+ vlc_value_t, vlc_value_t cur,
+ void *data )
{
- VLC_UNUSED( obj ); VLC_UNUSED( var ); VLC_UNUSED( old );
MainInputManager *mim = static_cast<MainInputManager*>(data);
playlist_add_t *p_add = static_cast<playlist_add_t*>( cur.p_address );
@@ -1249,11 +1241,9 @@ int MainInputManager::PLItemAppended
return VLC_SUCCESS;
}
-int MainInputManager::PLItemRemoved
-( vlc_object_t * obj, const char *var, vlc_value_t old, vlc_value_t cur, void *data )
+int MainInputManager::PLItemRemoved( vlc_object_t *obj, const char *,
+ vlc_value_t, vlc_value_t cur, void *data )
{
- VLC_UNUSED( var ); VLC_UNUSED( old );
-
playlist_t *pl = (playlist_t *) obj;
MainInputManager *mim = static_cast<MainInputManager*>(data);
diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp
index 60800b4..81eea83 100644
--- a/modules/gui/qt/main_interface.cpp
+++ b/modules/gui/qt/main_interface.cpp
@@ -1655,11 +1655,9 @@ void MainInterface::setRaise()
* We don't show the menu directly here because we don't want the
* caller to block for a too long time.
*****************************************************************************/
-static int PopupMenuCB( vlc_object_t *p_this, const char *psz_variable,
- vlc_value_t old_val, vlc_value_t new_val, void *param )
+static int PopupMenuCB( vlc_object_t *, const char *,
+ vlc_value_t, vlc_value_t new_val, void *param )
{
- VLC_UNUSED( p_this ); VLC_UNUSED( psz_variable ); VLC_UNUSED( old_val );
-
intf_thread_t *p_intf = (intf_thread_t *)param;
if( p_intf->pf_show_dialog )
@@ -1674,12 +1672,9 @@ static int PopupMenuCB( vlc_object_t *p_this, const char *psz_variable,
/*****************************************************************************
* IntfShowCB: callback triggered by the intf-toggle-fscontrol libvlc variable.
*****************************************************************************/
-static int IntfShowCB( vlc_object_t *p_this, const char *psz_variable,
- vlc_value_t old_val, vlc_value_t new_val, void *param )
+static int IntfShowCB( vlc_object_t *, const char *,
+ vlc_value_t, vlc_value_t, void *param )
{
- VLC_UNUSED( p_this ); VLC_UNUSED( psz_variable ); VLC_UNUSED( old_val );
- VLC_UNUSED( new_val );
-
intf_thread_t *p_intf = (intf_thread_t *)param;
p_intf->p_sys->p_mi->toggleFSC();
@@ -1690,12 +1685,9 @@ static int IntfShowCB( vlc_object_t *p_this, const char *psz_variable,
/*****************************************************************************
* IntfRaiseMainCB: callback triggered by the intf-show-main libvlc variable.
*****************************************************************************/
-static int IntfRaiseMainCB( vlc_object_t *p_this, const char *psz_variable,
- vlc_value_t old_val, vlc_value_t new_val, void *param )
+static int IntfRaiseMainCB( vlc_object_t *, const char *,
+ vlc_value_t, vlc_value_t, void *param )
{
- VLC_UNUSED( p_this ); VLC_UNUSED( psz_variable ); VLC_UNUSED( old_val );
- VLC_UNUSED( new_val );
-
intf_thread_t *p_intf = (intf_thread_t *)param;
p_intf->p_sys->p_mi->emitRaise();
@@ -1705,12 +1697,9 @@ static int IntfRaiseMainCB( vlc_object_t *p_this, const char *psz_variable,
/*****************************************************************************
* IntfBossCB: callback triggered by the intf-boss libvlc variable.
*****************************************************************************/
-static int IntfBossCB( vlc_object_t *p_this, const char *psz_variable,
- vlc_value_t old_val, vlc_value_t new_val, void *param )
+static int IntfBossCB( vlc_object_t *, const char *,
+ vlc_value_t, vlc_value_t, void *param )
{
- VLC_UNUSED( p_this ); VLC_UNUSED( psz_variable ); VLC_UNUSED( old_val );
- VLC_UNUSED( new_val );
-
intf_thread_t *p_intf = (intf_thread_t *)param;
p_intf->p_sys->p_mi->emitBoss();
More information about the vlc-commits
mailing list