diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-01-04 13:16:13 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-01-04 13:16:13 +0100 |
commit | fad0abffec1ba784256daa68c7d52891c2d08825 (patch) | |
tree | d7d255805500e1f2598ef6aea7b21ca116a1b1df /lib/settings | |
parent | Fixed crash with Settings dialog (diff) | |
download | smolbote-fad0abffec1ba784256daa68c7d52891c2d08825.tar.xz |
Various minor fixes
- typo fixes
- bumped copyright year
- removed a bunch of unused imports
- fixed a couple of clazy warnings
Diffstat (limited to 'lib/settings')
-rw-r--r-- | lib/settings/settingsdialog.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/settings/settingsdialog.cpp b/lib/settings/settingsdialog.cpp index 9a589d6..478e372 100644 --- a/lib/settings/settingsdialog.cpp +++ b/lib/settings/settingsdialog.cpp @@ -74,11 +74,11 @@ inline QHBoxLayout *createEntry(Configuration* config, const std::string &path, QToolButton *resetButton = new QToolButton(widget); resetButton->setIcon(widget->style()->standardIcon(QStyle::SP_DialogResetButton)); - QObject::connect(resetButton, &QToolButton::clicked, [config, path, lineEdit]() { + QObject::connect(resetButton, &QToolButton::clicked, widget, [config, path, lineEdit]() { config->resetValue(path.c_str()); lineEdit->setText(QString::fromStdString(config->value<std::string>(path.c_str()).value())); }); - QObject::connect(lineEdit, &QLineEdit::editingFinished, [config, path, lineEdit]() { + QObject::connect(lineEdit, &QLineEdit::editingFinished, widget, [config, path, lineEdit]() { config->setValue<std::string>(path, lineEdit->text().toStdString()); }); |