[vlc-devel] [PATCH 3/3] Revert "qt: enable audio filters with their name/shortcut"
Thomas Guillem
thomas at gllm.fr
Tue Nov 7 18:40:36 CET 2017
This reverts commit 2adbdef3dff50986bd1dca2986212b9d2eb45e00.
---
modules/gui/qt/components/extended_panels.cpp | 17 +++++++----------
modules/gui/qt/components/extended_panels.hpp | 4 +---
2 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/modules/gui/qt/components/extended_panels.cpp b/modules/gui/qt/components/extended_panels.cpp
index 6136718f78..688186f0c5 100644
--- a/modules/gui/qt/components/extended_panels.cpp
+++ b/modules/gui/qt/components/extended_panels.cpp
@@ -901,12 +901,9 @@ void FilterSliderData::writeToConfig()
}
AudioFilterControlWidget::AudioFilterControlWidget
-( intf_thread_t *_p_intf, QWidget *parent, const char *_shortcut,
- const char *_name = NULL ) :
- QWidget( parent ), p_intf( _p_intf ), shortcut( _shortcut ),
- name( _name ? _name : _shortcut ), i_smallfont(0)
-{
-}
+( intf_thread_t *_p_intf, QWidget *parent, const char *_name ) :
+ QWidget( parent ), p_intf( _p_intf ), name( _name ), i_smallfont(0)
+{}
void AudioFilterControlWidget::connectConfigChanged( FilterSliderData *slider )
{
@@ -949,7 +946,7 @@ void AudioFilterControlWidget::build()
char *psz_af = var_InheritString( THEPL, "audio-filter" );
- if( psz_af && filterIsPresent( qfu(psz_af), shortcut ) )
+ if( psz_af && filterIsPresent( qfu(psz_af), name ) )
slidersBox->setChecked( true );
else
slidersBox->setChecked( false );
@@ -967,10 +964,10 @@ void AudioFilterControlWidget::enable( bool b_enable )
return;
}
- QString result = ChangeFiltersString( p_intf, "audio-filter", qtu(shortcut),
+ QString result = ChangeFiltersString( p_intf, "audio-filter", qtu(name),
b_enable );
emit configChanged( qfu("audio-filter"), result );
- playlist_EnableAudioFilter( THEPL, qtu(shortcut), b_enable );
+ playlist_EnableAudioFilter( THEPL, qtu(name), b_enable );
}
/**********************************************************************
@@ -1322,7 +1319,7 @@ StereoWidener::StereoWidener( intf_thread_t *p_intf, QWidget *parent )
**********************************************************************/
PitchShifter::PitchShifter( intf_thread_t *p_intf, QWidget *parent )
- : AudioFilterControlWidget( p_intf, parent, "pitch", "scaletempo" )
+ : AudioFilterControlWidget( p_intf, parent, "pitch" )
{
i_smallfont = -1;
controls.append( { "pitch-shift", N_("Adjust pitch"), "semitones",
diff --git a/modules/gui/qt/components/extended_panels.hpp b/modules/gui/qt/components/extended_panels.hpp
index f303f1e978..6c75679669 100644
--- a/modules/gui/qt/components/extended_panels.hpp
+++ b/modules/gui/qt/components/extended_panels.hpp
@@ -132,8 +132,7 @@ class AudioFilterControlWidget : public QWidget
Q_OBJECT
public:
- AudioFilterControlWidget( intf_thread_t *, QWidget *, const char *shortcut,
- const char *name /* = NULL */ );
+ AudioFilterControlWidget( intf_thread_t *, QWidget *, const char *name );
protected:
virtual void build();
@@ -142,7 +141,6 @@ protected:
QVector<FilterSliderData *> sliderDatas;
QGroupBox *slidersBox;
intf_thread_t *p_intf;
- QString shortcut; // filter's module shorcut name
QString name; // filter's module name
int i_smallfont;
--
2.11.0
More information about the vlc-devel
mailing list