Commit 73ddb678 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Settings: Avoid naming each categorie "empty" in the settings widget.

parent 14190296
......@@ -56,6 +56,8 @@ PreferenceWidget::PreferenceWidget( const QString &categorie, SettingsManager::T
m_settings.push_back( widget );
}
setLayout( layout );
m_categorie[0] = m_categorie[0].toUpper();
}
ISettingsCategorieWidget*
......@@ -84,3 +86,9 @@ PreferenceWidget::save()
foreach ( ISettingsCategorieWidget* w, m_settings )
w->save();
}
const QString&
PreferenceWidget::categorie() const
{
return m_categorie;
}
......@@ -42,6 +42,7 @@ class PreferenceWidget : public QWidget
virtual ~PreferenceWidget() {}
virtual void save();
const QString &categorie() const;
private:
ISettingsCategorieWidget *widgetFactory( SettingValue* s );
......
......@@ -165,7 +165,7 @@ void Settings::switchWidget( int index )
// This should never happen
if ( !pWidget )
return;
m_title->setText( pWidget->categorie() );
// If there is already a widget into the QScrollArea take it
// to avoid its deletion.
if ( m_configPanel->widget() )
......
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