Commit 9c02536b authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen Committed by Jean-Baptiste Kempf

qt4: preferences_widget: Remove useless reference.

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 3da5ea41
...@@ -70,18 +70,10 @@ QString formatTooltip(const QString & tooltip) ...@@ -70,18 +70,10 @@ QString formatTooltip(const QString & tooltip)
return formatted; return formatted;
} }
ConfigControl *ConfigControl::createControl( vlc_object_t *p_this,
module_config_t *p_item,
QWidget *parent )
{
int i = 0;
return createControl( p_this, p_item, parent, NULL, i );
}
ConfigControl *ConfigControl::createControl( vlc_object_t *p_this, ConfigControl *ConfigControl::createControl( vlc_object_t *p_this,
module_config_t *p_item, module_config_t *p_item,
QWidget *parent, QWidget *parent,
QGridLayout *l, int &line ) QGridLayout *l, int line )
{ {
ConfigControl *p_control = NULL; ConfigControl *p_control = NULL;
...@@ -214,7 +206,7 @@ VStringConfigControl::doApply( intf_thread_t *p_intf ) ...@@ -214,7 +206,7 @@ VStringConfigControl::doApply( intf_thread_t *p_intf )
StringConfigControl::StringConfigControl( vlc_object_t *_p_this, StringConfigControl::StringConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item, module_config_t *_p_item,
QWidget *_parent, QGridLayout *l, QWidget *_parent, QGridLayout *l,
int &line, bool pwd ) : int line, bool pwd ) :
VStringConfigControl( _p_this, _p_item, _parent ) VStringConfigControl( _p_this, _p_item, _parent )
{ {
label = new QLabel( qtr(p_item->psz_text) ); label = new QLabel( qtr(p_item->psz_text) );
...@@ -266,7 +258,7 @@ void StringConfigControl::finish() ...@@ -266,7 +258,7 @@ void StringConfigControl::finish()
FileConfigControl::FileConfigControl( vlc_object_t *_p_this, FileConfigControl::FileConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item, module_config_t *_p_item,
QWidget *_parent, QGridLayout *l, QWidget *_parent, QGridLayout *l,
int &line ) : int line ) :
VStringConfigControl( _p_this, _p_item, _parent ) VStringConfigControl( _p_this, _p_item, _parent )
{ {
label = new QLabel( qtr(p_item->psz_text) ); label = new QLabel( qtr(p_item->psz_text) );
...@@ -345,7 +337,7 @@ void FileConfigControl::finish() ...@@ -345,7 +337,7 @@ void FileConfigControl::finish()
/********* String / Directory **********/ /********* String / Directory **********/
DirectoryConfigControl::DirectoryConfigControl( vlc_object_t *_p_this, DirectoryConfigControl::DirectoryConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item, QWidget *_p_widget, module_config_t *_p_item, QWidget *_p_widget,
QGridLayout *_p_layout, int& _int ) : QGridLayout *_p_layout, int _int ) :
FileConfigControl( _p_this, _p_item, _p_widget, _p_layout, _int ) FileConfigControl( _p_this, _p_item, _p_widget, _p_layout, _int )
{} {}
...@@ -370,7 +362,7 @@ void DirectoryConfigControl::updateField() ...@@ -370,7 +362,7 @@ void DirectoryConfigControl::updateField()
/********* String / Font **********/ /********* String / Font **********/
FontConfigControl::FontConfigControl( vlc_object_t *_p_this, FontConfigControl::FontConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item, QWidget *_parent, module_config_t *_p_item, QWidget *_parent,
QGridLayout *_p_layout, int& line) : QGridLayout *_p_layout, int line) :
VStringConfigControl( _p_this, _p_item, _parent ) VStringConfigControl( _p_this, _p_item, _parent )
{ {
label = new QLabel( qtr(p_item->psz_text) ); label = new QLabel( qtr(p_item->psz_text) );
...@@ -403,7 +395,7 @@ FontConfigControl::FontConfigControl( vlc_object_t *_p_this, ...@@ -403,7 +395,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, bool bycat,
QGridLayout *l, int &line) : QGridLayout *l, int line) :
VStringConfigControl( _p_this, _p_item, _parent ) VStringConfigControl( _p_this, _p_item, _parent )
{ {
label = new QLabel( qtr(p_item->psz_text) ); label = new QLabel( qtr(p_item->psz_text) );
...@@ -570,7 +562,7 @@ void setfillVLCConfigCombo( const char *configname, intf_thread_t *p_intf, ...@@ -570,7 +562,7 @@ void setfillVLCConfigCombo( const char *configname, intf_thread_t *p_intf,
/********* Module **********/ /********* Module **********/
ModuleConfigControl::ModuleConfigControl( vlc_object_t *_p_this, ModuleConfigControl::ModuleConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item, QWidget *_parent, bool bycat, module_config_t *_p_item, QWidget *_parent, bool bycat,
QGridLayout *l, int &line) : QGridLayout *l, int line) :
VStringConfigControl( _p_this, _p_item, _parent ) VStringConfigControl( _p_this, _p_item, _parent )
{ {
label = new QLabel( qtr(p_item->psz_text) ); label = new QLabel( qtr(p_item->psz_text) );
...@@ -662,7 +654,7 @@ QString ModuleConfigControl::getValue() const ...@@ -662,7 +654,7 @@ QString ModuleConfigControl::getValue() const
/********* Module list **********/ /********* Module list **********/
ModuleListConfigControl::ModuleListConfigControl( vlc_object_t *_p_this, ModuleListConfigControl::ModuleListConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item, QWidget *_parent, bool bycat, module_config_t *_p_item, QWidget *_parent, bool bycat,
QGridLayout *l, int &line) : QGridLayout *l, int line) :
VStringConfigControl( _p_this, _p_item, _parent ) VStringConfigControl( _p_this, _p_item, _parent )
{ {
groupBox = NULL; groupBox = NULL;
...@@ -823,7 +815,7 @@ VIntConfigControl::doApply( intf_thread_t *p_intf ) ...@@ -823,7 +815,7 @@ VIntConfigControl::doApply( intf_thread_t *p_intf )
IntegerConfigControl::IntegerConfigControl( vlc_object_t *_p_this, IntegerConfigControl::IntegerConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item, module_config_t *_p_item,
QWidget *_parent, QGridLayout *l, QWidget *_parent, QGridLayout *l,
int &line ) : int line ) :
VIntConfigControl( _p_this, _p_item, _parent ) VIntConfigControl( _p_this, _p_item, _parent )
{ {
label = new QLabel( qtr(p_item->psz_text) ); label = new QLabel( qtr(p_item->psz_text) );
...@@ -880,7 +872,7 @@ int IntegerConfigControl::getValue() const ...@@ -880,7 +872,7 @@ int IntegerConfigControl::getValue() const
IntegerRangeConfigControl::IntegerRangeConfigControl( vlc_object_t *_p_this, IntegerRangeConfigControl::IntegerRangeConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item, module_config_t *_p_item,
QWidget *_parent, QGridLayout *l, QWidget *_parent, QGridLayout *l,
int &line ) : int line ) :
IntegerConfigControl( _p_this, _p_item, _parent, l, line ) IntegerConfigControl( _p_this, _p_item, _parent, l, line )
{ {
finish(); finish();
...@@ -931,7 +923,7 @@ int IntegerRangeSliderConfigControl::getValue() const ...@@ -931,7 +923,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 bycat,
QGridLayout *l, int &line) : QGridLayout *l, int line) :
VIntConfigControl( _p_this, _p_item, _parent ) VIntConfigControl( _p_this, _p_item, _parent )
{ {
label = new QLabel( qtr(p_item->psz_text) ); label = new QLabel( qtr(p_item->psz_text) );
...@@ -1052,7 +1044,7 @@ int IntegerListConfigControl::getValue() const ...@@ -1052,7 +1044,7 @@ int IntegerListConfigControl::getValue() const
BoolConfigControl::BoolConfigControl( vlc_object_t *_p_this, BoolConfigControl::BoolConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item, module_config_t *_p_item,
QWidget *_parent, QGridLayout *l, QWidget *_parent, QGridLayout *l,
int &line ) : int line ) :
VIntConfigControl( _p_this, _p_item, _parent ) VIntConfigControl( _p_this, _p_item, _parent )
{ {
checkbox = new QCheckBox( qtr(p_item->psz_text) ); checkbox = new QCheckBox( qtr(p_item->psz_text) );
...@@ -1108,7 +1100,7 @@ VFloatConfigControl::doApply( intf_thread_t *p_intf ) ...@@ -1108,7 +1100,7 @@ VFloatConfigControl::doApply( intf_thread_t *p_intf )
FloatConfigControl::FloatConfigControl( vlc_object_t *_p_this, FloatConfigControl::FloatConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item, module_config_t *_p_item,
QWidget *_parent, QGridLayout *l, QWidget *_parent, QGridLayout *l,
int &line ) : int line ) :
VFloatConfigControl( _p_this, _p_item, _parent ) VFloatConfigControl( _p_this, _p_item, _parent )
{ {
label = new QLabel( qtr(p_item->psz_text) ); label = new QLabel( qtr(p_item->psz_text) );
...@@ -1168,7 +1160,7 @@ float FloatConfigControl::getValue() const ...@@ -1168,7 +1160,7 @@ float FloatConfigControl::getValue() const
FloatRangeConfigControl::FloatRangeConfigControl( vlc_object_t *_p_this, FloatRangeConfigControl::FloatRangeConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item, module_config_t *_p_item,
QWidget *_parent, QGridLayout *l, QWidget *_parent, QGridLayout *l,
int &line ) : int line ) :
FloatConfigControl( _p_this, _p_item, _parent, l, line ) FloatConfigControl( _p_this, _p_item, _parent, l, line )
{ {
finish(); finish();
...@@ -1196,7 +1188,7 @@ void FloatRangeConfigControl::finish() ...@@ -1196,7 +1188,7 @@ void FloatRangeConfigControl::finish()
KeySelectorControl::KeySelectorControl( vlc_object_t *_p_this, KeySelectorControl::KeySelectorControl( vlc_object_t *_p_this,
module_config_t *_p_item, module_config_t *_p_item,
QWidget *_parent, QGridLayout *l, QWidget *_parent, QGridLayout *l,
int &line ) : int line ) :
ConfigControl( _p_this, _p_item, _parent ) ConfigControl( _p_this, _p_item, _parent )
{ {
......
...@@ -96,11 +96,9 @@ public: ...@@ -96,11 +96,9 @@ public:
virtual void hide() { getWidget()->hide(); }; virtual void hide() { getWidget()->hide(); };
virtual void show() { getWidget()->show(); }; virtual void show() { getWidget()->show(); };
static ConfigControl * createControl( vlc_object_t*,
module_config_t*,QWidget* );
static ConfigControl * createControl( vlc_object_t*, static ConfigControl * createControl( vlc_object_t*,
module_config_t*,QWidget*, module_config_t*,QWidget*,
QGridLayout *, int& ); QGridLayout *, int line = 0 );
virtual void doApply( intf_thread_t *) = 0; virtual void doApply( intf_thread_t *) = 0;
protected: protected:
vlc_object_t *p_this; vlc_object_t *p_this;
...@@ -135,7 +133,7 @@ class IntegerConfigControl : public VIntConfigControl ...@@ -135,7 +133,7 @@ class IntegerConfigControl : public VIntConfigControl
Q_OBJECT Q_OBJECT
public: public:
IntegerConfigControl( vlc_object_t *, module_config_t *, QWidget *, IntegerConfigControl( vlc_object_t *, module_config_t *, QWidget *,
QGridLayout *, int& ); QGridLayout *, int );
IntegerConfigControl( vlc_object_t *, module_config_t *, IntegerConfigControl( vlc_object_t *, module_config_t *,
QLabel*, QSpinBox* ); QLabel*, QSpinBox* );
IntegerConfigControl( vlc_object_t *, module_config_t *, IntegerConfigControl( vlc_object_t *, module_config_t *,
...@@ -155,7 +153,7 @@ class IntegerRangeConfigControl : public IntegerConfigControl ...@@ -155,7 +153,7 @@ class IntegerRangeConfigControl : public IntegerConfigControl
{ {
public: public:
IntegerRangeConfigControl( vlc_object_t *, module_config_t *, QWidget *, IntegerRangeConfigControl( vlc_object_t *, module_config_t *, QWidget *,
QGridLayout *, int& ); QGridLayout *, int );
IntegerRangeConfigControl( vlc_object_t *, module_config_t *, IntegerRangeConfigControl( vlc_object_t *, module_config_t *,
QLabel*, QSpinBox* ); QLabel*, QSpinBox* );
private: private:
...@@ -180,7 +178,7 @@ class IntegerListConfigControl : public VIntConfigControl ...@@ -180,7 +178,7 @@ class IntegerListConfigControl : public VIntConfigControl
Q_OBJECT Q_OBJECT
public: public:
IntegerListConfigControl( vlc_object_t *, module_config_t *, QWidget *, IntegerListConfigControl( vlc_object_t *, module_config_t *, QWidget *,
bool, QGridLayout*, int& ); bool, QGridLayout*, int );
IntegerListConfigControl( vlc_object_t *, module_config_t *, QLabel *, IntegerListConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QComboBox*, bool ); QComboBox*, bool );
virtual int getValue() const; virtual int getValue() const;
...@@ -199,7 +197,7 @@ class BoolConfigControl : public VIntConfigControl ...@@ -199,7 +197,7 @@ class BoolConfigControl : public VIntConfigControl
{ {
public: 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*, bool );
virtual int getValue() const; virtual int getValue() const;
...@@ -232,7 +230,7 @@ class FloatConfigControl : public VFloatConfigControl ...@@ -232,7 +230,7 @@ class FloatConfigControl : public VFloatConfigControl
Q_OBJECT Q_OBJECT
public: public:
FloatConfigControl( vlc_object_t *, module_config_t *, QWidget *, FloatConfigControl( vlc_object_t *, module_config_t *, QWidget *,
QGridLayout *, int& ); QGridLayout *, int );
FloatConfigControl( vlc_object_t *, module_config_t *, FloatConfigControl( vlc_object_t *, module_config_t *,
QLabel*, QDoubleSpinBox* ); QLabel*, QDoubleSpinBox* );
virtual float getValue() const; virtual float getValue() const;
...@@ -252,7 +250,7 @@ class FloatRangeConfigControl : public FloatConfigControl ...@@ -252,7 +250,7 @@ class FloatRangeConfigControl : public FloatConfigControl
Q_OBJECT Q_OBJECT
public: public:
FloatRangeConfigControl( vlc_object_t *, module_config_t *, QWidget *, FloatRangeConfigControl( vlc_object_t *, module_config_t *, QWidget *,
QGridLayout *, int& ); QGridLayout *, int );
FloatRangeConfigControl( vlc_object_t *, module_config_t *, FloatRangeConfigControl( vlc_object_t *, module_config_t *,
QLabel*, QDoubleSpinBox* ); QLabel*, QDoubleSpinBox* );
private: private:
...@@ -280,7 +278,7 @@ class StringConfigControl : public VStringConfigControl ...@@ -280,7 +278,7 @@ class StringConfigControl : public VStringConfigControl
Q_OBJECT Q_OBJECT
public: public:
StringConfigControl( vlc_object_t *, module_config_t *, QWidget *, StringConfigControl( vlc_object_t *, module_config_t *, QWidget *,
QGridLayout *, int&, bool pwd ); QGridLayout *, int, bool pwd );
StringConfigControl( vlc_object_t *, module_config_t *, QLabel *, StringConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QLineEdit*, bool pwd ); QLineEdit*, bool pwd );
virtual QString getValue() const { return text->text(); }; virtual QString getValue() const { return text->text(); };
...@@ -297,7 +295,7 @@ class FileConfigControl : public VStringConfigControl ...@@ -297,7 +295,7 @@ class FileConfigControl : public VStringConfigControl
Q_OBJECT Q_OBJECT
public: public:
FileConfigControl( vlc_object_t *, module_config_t *, QWidget *, FileConfigControl( vlc_object_t *, module_config_t *, QWidget *,
QGridLayout *, int& ); QGridLayout *, int );
FileConfigControl( vlc_object_t *, module_config_t *, QLabel *, FileConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QLineEdit *, QPushButton * ); QLineEdit *, QPushButton * );
virtual QString getValue() const { return text->text(); }; virtual QString getValue() const { return text->text(); };
...@@ -317,7 +315,7 @@ class DirectoryConfigControl : public FileConfigControl ...@@ -317,7 +315,7 @@ class DirectoryConfigControl : public FileConfigControl
Q_OBJECT Q_OBJECT
public: public:
DirectoryConfigControl( vlc_object_t *, module_config_t *, QWidget *, DirectoryConfigControl( vlc_object_t *, module_config_t *, QWidget *,
QGridLayout *, int& ); QGridLayout *, int );
DirectoryConfigControl( vlc_object_t *, module_config_t *, QLabel *, DirectoryConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QLineEdit *, QPushButton * ); QLineEdit *, QPushButton * );
public slots: public slots:
...@@ -329,7 +327,7 @@ class FontConfigControl : public VStringConfigControl ...@@ -329,7 +327,7 @@ class FontConfigControl : public VStringConfigControl
Q_OBJECT Q_OBJECT
public: public:
FontConfigControl( vlc_object_t *, module_config_t *, QWidget *, FontConfigControl( vlc_object_t *, module_config_t *, QWidget *,
QGridLayout *, int&); QGridLayout *, int);
FontConfigControl( vlc_object_t *, module_config_t *, QLabel *, FontConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QFontComboBox *); QFontComboBox *);
virtual QString getValue() const { return font->currentFont().family(); } virtual QString getValue() const { return font->currentFont().family(); }
...@@ -342,7 +340,7 @@ class ModuleConfigControl : public VStringConfigControl ...@@ -342,7 +340,7 @@ class ModuleConfigControl : public VStringConfigControl
{ {
public: public:
ModuleConfigControl( vlc_object_t *, module_config_t *, QWidget *, bool, ModuleConfigControl( vlc_object_t *, module_config_t *, QWidget *, bool,
QGridLayout*, int& ); QGridLayout*, int );
ModuleConfigControl( vlc_object_t *, module_config_t *, QLabel *, ModuleConfigControl( vlc_object_t *, module_config_t *, QLabel *,
QComboBox*, bool ); QComboBox*, bool );
virtual QString getValue() const; virtual QString getValue() const;
...@@ -365,7 +363,7 @@ class ModuleListConfigControl : public VStringConfigControl ...@@ -365,7 +363,7 @@ class ModuleListConfigControl : public VStringConfigControl
friend class ConfigControl; friend class ConfigControl;
public: public:
ModuleListConfigControl( vlc_object_t *, module_config_t *, QWidget *, ModuleListConfigControl( vlc_object_t *, module_config_t *, QWidget *,
bool, QGridLayout*, int& ); bool, QGridLayout*, int );
// ModuleListConfigControl( vlc_object_t *, module_config_t *, QLabel *, // ModuleListConfigControl( vlc_object_t *, module_config_t *, QLabel *,
// QComboBox*, bool ); // QComboBox*, bool );
virtual ~ModuleListConfigControl(); virtual ~ModuleListConfigControl();
...@@ -386,7 +384,7 @@ class StringListConfigControl : public VStringConfigControl ...@@ -386,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& ); bool, 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;
...@@ -453,7 +451,7 @@ class KeySelectorControl : public ConfigControl ...@@ -453,7 +451,7 @@ class KeySelectorControl : public ConfigControl
Q_OBJECT Q_OBJECT
public: public:
KeySelectorControl( vlc_object_t *, module_config_t *, QWidget *, KeySelectorControl( vlc_object_t *, module_config_t *, QWidget *,
QGridLayout*, int& ); QGridLayout*, int );
virtual int getType() const { return CONFIG_ITEM_KEY; } virtual int getType() const { return CONFIG_ITEM_KEY; }
virtual void hide() { table->hide(); if( label ) label->hide(); } virtual void hide() { table->hide(); if( label ) label->hide(); }
virtual void show() { table->show(); if( label ) label->show(); } virtual void show() { table->show(); if( label ) label->show(); }
......
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