[vlc-commits] Qt: remove unused variable callback parameters
Rémi Denis-Courmont
git at videolan.org
Mon Jul 25 22:18:25 CEST 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jul 25 23:17:55 2016 +0300| [9eac3571d7733d01800b496b779c9276400b617e] | committer: Rémi Denis-Courmont
Qt: remove unused variable callback parameters
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9eac3571d7733d01800b496b779c9276400b617e
---
modules/gui/qt/adapters/variables.cpp | 6 ++---
modules/gui/qt/components/controller.cpp | 14 ++++--------
modules/gui/qt/input_manager.cpp | 38 ++++++++++++--------------------
modules/gui/qt/main_interface.cpp | 27 +++++++----------------
4 files changed, 28 insertions(+), 57 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..51bd050 100644
--- a/modules/gui/qt/components/controller.cpp
+++ b/modules/gui/qt/components/controller.cpp
@@ -1116,12 +1116,9 @@ 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;
msg_Dbg( p_vout, "Qt: Fullscreen state changed" );
@@ -1132,12 +1129,9 @@ 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;
FullscreenControllerWidget *p_fs = (FullscreenControllerWidget *)data;
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