summaryrefslogtreecommitdiffhomepage
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/mapping-dialog.cpp8
-rw-r--r--gui/options-dialog.cpp9
2 files changed, 5 insertions, 12 deletions
diff --git a/gui/mapping-dialog.cpp b/gui/mapping-dialog.cpp
index cdbf532e..bdf33a77 100644
--- a/gui/mapping-dialog.cpp
+++ b/gui/mapping-dialog.cpp
@@ -117,9 +117,7 @@ void mapping_dialog::load()
if (altp)
{
- connect(&axis.opts.altp,
- value_::value_changed<bool>(),
- this, [&](bool f) { qfc.setEnabled(f); });
+ axis.opts.altp.connect_to(this, [&](bool f) { qfc.setEnabled(f); });
qfc.setEnabled(axis.opts.altp);
}
@@ -164,8 +162,8 @@ void mapping_dialog::load()
qfc.set_snap(.5, 1);
- connect(&axis.opts.clamp_x_, value_::value_changed<int>(), &qfc, update_xstep);
- connect(&axis.opts.clamp_y_, value_::value_changed<int>(), &qfc, update_ystep);
+ axis.opts.clamp_x_.connect_to(&qfc, update_xstep);
+ axis.opts.clamp_y_.connect_to(&qfc, update_ystep);
// force signal to avoid duplicating the slot's logic
qfc.set_config(&conf);
diff --git a/gui/options-dialog.cpp b/gui/options-dialog.cpp
index ac4117bc..ab36d73b 100644
--- a/gui/options-dialog.cpp
+++ b/gui/options-dialog.cpp
@@ -167,13 +167,8 @@ options_dialog::options_dialog(std::unique_ptr<ITrackerDialog>& tracker_dialog_,
{
tmp val = val_;
val.label->setText(kopts_to_string(val.opt));
- connect(&val.opt.keycode,
- static_cast<void (value_::*)(const QString&) const>(&value_::valueChanged),
- val.label,
- [=](const QString&) { val.label->setText(kopts_to_string(val.opt)); });
- {
- connect(val.button, &QPushButton::clicked, this, [=] { bind_key(val.opt, val.label); });
- }
+ val.opt.keycode.connect_to(val.label, [=] { val.label->setText(kopts_to_string(val.opt)); }, Qt::DirectConnection);
+ connect(val.button, &QPushButton::clicked, this, [=] { bind_key(val.opt, val.label); });
}
auto add_module_tab = [this] (auto& place, auto&& dlg, const QString& label) {