each Setting is now responsible for adding themselves to the settings list

This commit is contained in:
Rasmus Karlsson
2017-01-23 09:48:32 +01:00
parent 5429e62e73
commit 1e6e395623
3 changed files with 55 additions and 66 deletions
+3
View File
@@ -231,6 +231,9 @@ SettingsDialog::createCheckbox(const QString &title,
{
auto checkbox = new QCheckBox(title);
// Set checkbox initial state
checkbox->setChecked(setting.get());
QObject::connect(checkbox, &QCheckBox::toggled, this,
[&setting, this](bool state) { setting.set(state); });