Commit ecd17cb6 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: kill unused-parameters variables warnings

And other simplifications
parent 5feabe6b
......@@ -1116,6 +1116,8 @@ void Equalizer::setCorePreset( int i_preset )
static int PresetCallback( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED( p_this ); VLC_UNUSED( psz_cmd ); VLC_UNUSED( oldval );
char *psz_preset = newval.psz_string;
Equalizer *eq = ( Equalizer * )p_data;
int i_preset = eq->presetsComboBox->findData( QVariant( psz_preset ) );
......@@ -1241,7 +1243,7 @@ Compressor::Compressor( intf_thread_t *_p_intf, QWidget *_parent )
free( psz_af );
enable( enableCheck->isChecked() );
updateSliders( controlVars );
setValues( controlVars );
setValues();
}
void Compressor::enable()
......@@ -1275,10 +1277,10 @@ void Compressor::updateSliders( float * controlVars )
void Compressor::setInitValues()
{
setValues( controlVars );
setValues();
}
void Compressor::setValues( float * controlVars )
void Compressor::setValues()
{
aout_instance_t *p_aout = THEMIM->getAout();
......@@ -1389,7 +1391,7 @@ Spatializer::Spatializer( intf_thread_t *_p_intf, QWidget *_parent )
enableCheck->setChecked( true );
free( psz_af );
enable( enableCheck->isChecked() );
setValues( controlVars );
setValues();
}
void Spatializer::enable()
......@@ -1410,10 +1412,10 @@ void Spatializer::enable( bool en )
}
void Spatializer::setInitValues()
{
setValues( controlVars );
setValues();
}
void Spatializer::setValues( float *controlVars )
void Spatializer::setValues()
{
aout_instance_t *p_aout = THEMIM->getAout();
......@@ -1441,12 +1443,14 @@ void Spatializer::setValues( float *controlVars )
}
void Spatializer::delCallbacks( aout_instance_t *p_aout )
{
VLC_UNUSED( p_aout );
// var_DelCallback( p_aout, "Spatializer-bands", EqzCallback, this );
// var_DelCallback( p_aout, "Spatializer-preamp", EqzCallback, this );
}
void Spatializer::addCallbacks( aout_instance_t *p_aout )
{
VLC_UNUSED( p_aout );
// var_AddCallback( p_aout, "Spatializer-bands", EqzCallback, this );
// var_AddCallback( p_aout, "Spatializer-preamp", EqzCallback, this );
}
......
......@@ -135,7 +135,7 @@ private:
void addCallbacks( aout_instance_t * );
void updateSliders(float *);
void setValues(float *);
void setValues();
private slots:
void enable(bool);
......@@ -162,7 +162,7 @@ private:
void addCallbacks( aout_instance_t * );
intf_thread_t *p_intf;
void setValues(float *);
void setValues();
private slots:
void enable(bool);
......
......@@ -104,7 +104,7 @@ public:
virtual void clear() ;
virtual void accept() ;
protected:
bool eventFilter(QObject *obj, QEvent *event)
bool eventFilter(QObject *, QEvent *event)
{
if( event->type() == QEvent::Hide ||
event->type() == QEvent::HideToParent )
......
......@@ -387,7 +387,7 @@ LocationButton::LocationButton( const QString &text, bool bold,
#define PADDING 4
void LocationButton::paintEvent ( QPaintEvent * event )
void LocationButton::paintEvent ( QPaintEvent * )
{
QStyleOptionButton option;
option.initFrom( this );
......
......@@ -186,7 +186,7 @@ QMimeData *PLModel::mimeData( const QModelIndexList &indexes ) const
/* Drop operation */
bool PLModel::dropMimeData( const QMimeData *data, Qt::DropAction action,
int row, int column, const QModelIndex &parent )
int row, int, const QModelIndex &parent )
{
bool copy = action == Qt::CopyAction;
if( !copy && action != Qt::MoveAction )
......@@ -493,7 +493,7 @@ QModelIndex PLModel::parent( const QModelIndex &index ) const
return createIndex(parentItem->row(), 0, parentItem);
}
int PLModel::columnCount( const QModelIndex &i) const
int PLModel::columnCount( const QModelIndex &) const
{
return columnFromMeta( COLUMN_END );
}
......
......@@ -101,7 +101,7 @@ ConfigControl *ConfigControl::createControl( vlc_object_t *p_this,
l, line, false );
else
p_control = new StringListConfigControl( p_this, p_item,
parent, false, l, line );
parent, l, line );
break;
case CONFIG_ITEM_PASSWORD:
if( !p_item->i_list )
......@@ -109,7 +109,7 @@ ConfigControl *ConfigControl::createControl( vlc_object_t *p_this,
l, line, true );
else
p_control = new StringListConfigControl( p_this, p_item,
parent, true, l, line );
parent, l, line );
break;
case CONFIG_ITEM_INTEGER:
if( p_item->i_list )
......@@ -394,7 +394,7 @@ FontConfigControl::FontConfigControl( vlc_object_t *_p_this,
/********* String / choice list **********/
StringListConfigControl::StringListConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item, QWidget *_parent, bool bycat,
module_config_t *_p_item, QWidget *_parent,
QGridLayout *l, int line) :
VStringConfigControl( _p_this, _p_item, _parent )
{
......@@ -405,7 +405,7 @@ StringListConfigControl::StringListConfigControl( vlc_object_t *_p_this,
module_config_t *p_module_config = config_FindConfig( p_this, p_item->psz_name );
finish( p_module_config, bycat );
finish( p_module_config );
if( !l )
{
l = new QGridLayout();
......@@ -454,23 +454,23 @@ void StringListConfigControl::actionRequested( int i_action )
if( p_module_config->b_dirty )
{
combo->clear();
finish( p_module_config, true );
finish( p_module_config );
p_module_config->b_dirty = false;
}
}
StringListConfigControl::StringListConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item, QLabel *_label, QComboBox *_combo,
bool bycat ) : VStringConfigControl( _p_this, _p_item )
bool ) : VStringConfigControl( _p_this, _p_item )
{
combo = _combo;
label = _label;
module_config_t *p_module_config = config_FindConfig( p_this, getName() );
finish( p_module_config, bycat );
finish( p_module_config );
}
void StringListConfigControl::finish(module_config_t *p_module_config, bool bycat )
void StringListConfigControl::finish(module_config_t *p_module_config )
{
combo->setEditable( false );
......@@ -922,7 +922,7 @@ int IntegerRangeSliderConfigControl::getValue() const
/********* Integer / choice list **********/
IntegerListConfigControl::IntegerListConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item, QWidget *_parent, bool bycat,
module_config_t *_p_item, QWidget *_parent, bool,
QGridLayout *l, int line) :
VIntConfigControl( _p_this, _p_item, _parent )
{
......@@ -932,7 +932,7 @@ IntegerListConfigControl::IntegerListConfigControl( vlc_object_t *_p_this,
module_config_t *p_module_config = config_FindConfig( p_this, p_item->psz_name );
finish( p_module_config, bycat );
finish( p_module_config );
if( !l )
{
QHBoxLayout *layout = new QHBoxLayout();
......@@ -966,17 +966,17 @@ IntegerListConfigControl::IntegerListConfigControl( vlc_object_t *_p_this,
}
IntegerListConfigControl::IntegerListConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item, QLabel *_label, QComboBox *_combo,
bool bycat ) : VIntConfigControl( _p_this, _p_item )
bool ) : VIntConfigControl( _p_this, _p_item )
{
combo = _combo;
label = _label;
module_config_t *p_module_config = config_FindConfig( p_this, getName() );
finish( p_module_config, bycat );
finish( p_module_config );
}
void IntegerListConfigControl::finish(module_config_t *p_module_config, bool bycat )
void IntegerListConfigControl::finish(module_config_t *p_module_config )
{
combo->setEditable( false );
......@@ -1030,7 +1030,7 @@ void IntegerListConfigControl::actionRequested( int i_action )
if( p_module_config->b_dirty )
{
combo->clear();
finish( p_module_config, true );
finish( p_module_config );
p_module_config->b_dirty = false;
}
}
......@@ -1065,8 +1065,7 @@ BoolConfigControl::BoolConfigControl( vlc_object_t *_p_this,
BoolConfigControl::BoolConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item,
QLabel *_label,
QAbstractButton *_checkbox,
bool bycat ) :
QAbstractButton *_checkbox ) :
VIntConfigControl( _p_this, _p_item )
{
checkbox = _checkbox;
......@@ -1320,7 +1319,7 @@ void KeySelectorControl::filter( const QString &qs_search )
}
}
void KeySelectorControl::select( QTreeWidgetItem *keyItem, int column )
void KeySelectorControl::select( QTreeWidgetItem *, int column )
{
shortcutValue->setGlobal( column == 2 );
}
......
......@@ -185,7 +185,7 @@ public:
virtual void hide() { combo->hide(); if( label ) label->hide(); }
virtual void show() { combo->show(); if( label ) label->show(); }
private:
void finish(module_config_t *, bool );
void finish(module_config_t * );
QLabel *label;
QComboBox *combo;
private slots:
......@@ -199,7 +199,7 @@ public:
BoolConfigControl( vlc_object_t *, module_config_t *, QWidget *,
QGridLayout *, int );
BoolConfigControl( vlc_object_t *, module_config_t *,
QLabel *, QAbstractButton*, bool );
QLabel *, QAbstractButton* );
virtual int getValue() const;
virtual void show() { checkbox->show(); }
virtual void hide() { checkbox->hide(); }
......@@ -384,7 +384,7 @@ class StringListConfigControl : public VStringConfigControl
Q_OBJECT
public:
StringListConfigControl( vlc_object_t *, module_config_t *, QWidget *,
bool, QGridLayout*, int );
QGridLayout*, int );
StringListConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QComboBox*, bool );
virtual QString getValue() const;
......@@ -392,7 +392,7 @@ public:
virtual void show() { combo->show(); if( label ) label->show(); }
QComboBox *combo;
private:
void finish(module_config_t *, bool );
void finish(module_config_t * );
QLabel *label;
private slots:
void actionRequested( int );
......
......@@ -139,7 +139,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
if( p_config ) \
{ \
control = new BoolConfigControl( VLC_OBJECT(p_intf), \
p_config, NULL, ui.qcontrol, false ); \
p_config, NULL, ui.qcontrol ); \
controls.append( control ); \
} \
else { ui.qcontrol->setEnabled( false ); }
......
......@@ -674,7 +674,7 @@ void ExtensionDialog::DestroyWidget( extension_widget_t *p_widget,
}
/** Implement closeEvent() in order to intercept the event */
void ExtensionDialog::closeEvent( QCloseEvent *event )
void ExtensionDialog::closeEvent( QCloseEvent * )
{
assert( p_dialog != NULL );
msg_Dbg( p_intf, "Dialog '%s' received a closeEvent",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment