Commit 07be8bb5 authored by Rémi Duraffort's avatar Rémi Duraffort

Fix memleaks: Fill in the destructor of simple preference.

parent 552b5247
...@@ -568,6 +568,18 @@ void SPrefsPanel::updateAudioOptions( int number) ...@@ -568,6 +568,18 @@ void SPrefsPanel::updateAudioOptions( int number)
optionWidgets[fileW]->setVisible( ( value == "aout_file" ) ); optionWidgets[fileW]->setVisible( ( value == "aout_file" ) );
} }
SPrefsPanel::~SPrefsPanel()
{
QList<ConfigControl *>::Iterator conf_it;
for( conf_it = controls.begin() ; conf_it != controls.end() ; conf_it++ )
{
ConfigControl *c = qobject_cast<ConfigControl *>(*conf_it);
delete c;
}
controls.clear();
}
void SPrefsPanel::updateAudioVolume( int volume ) void SPrefsPanel::updateAudioVolume( int volume )
{ {
qobject_cast<QSpinBox *>(optionWidgets[volLW]) qobject_cast<QSpinBox *>(optionWidgets[volLW])
......
...@@ -105,7 +105,7 @@ class SPrefsPanel : public QWidget ...@@ -105,7 +105,7 @@ class SPrefsPanel : public QWidget
Q_OBJECT Q_OBJECT
public: public:
SPrefsPanel( intf_thread_t *, QWidget *, int ); SPrefsPanel( intf_thread_t *, QWidget *, int );
virtual ~SPrefsPanel() {}; virtual ~SPrefsPanel();
void apply(); void apply();
void clean(); void clean();
private: private:
......
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