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