summaryrefslogtreecommitdiffhomepage
path: root/options/tie.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-10-13 18:53:28 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-10-13 18:53:28 +0200
commit9da6dff1800d6b6598e6ad04465ee8b9cabb4167 (patch)
tree2f1692597748ce37d2ce147e8ed9f0c7d71d00e9 /options/tie.cpp
parent535e81402a65fa410e98899cd1780784d2f9815a (diff)
tracker/pt, options: fix threshold slider
It's only the tie_setting(slider_value, QSlider) that has race-free slider updates. Needed to update the threshold slider representation. Remove the tie_setting(int, QSlider) overload since it doesn't have the logic. Add a migration. Add base_value::notify() for use-cases like the checkbox updating the label.
Diffstat (limited to 'options/tie.cpp')
-rw-r--r--options/tie.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/options/tie.cpp b/options/tie.cpp
index 162a0f56..c0552d71 100644
--- a/options/tie.cpp
+++ b/options/tie.cpp
@@ -87,14 +87,6 @@ OTR_OPTIONS_EXPORT void tie_setting(value<int>& v, QSpinBox* sb)
base_value::connect(&v, SIGNAL(valueChanged(int)), sb, SLOT(setValue(int)), v.SAFE_CONNTYPE);
}
-OTR_OPTIONS_EXPORT void tie_setting(value<int>& v, QSlider* sl)
-{
- sl->setValue(v);
- v = sl->value();
- base_value::connect(sl, &QSlider::valueChanged, &v, base_value::signal_fun<int>(), v.DIRECT_CONNTYPE);
- base_value::connect(&v, base_value::signal_fun<int>(), sl, &QSlider::setValue, v.SAFE_CONNTYPE);
-}
-
OTR_OPTIONS_EXPORT void tie_setting(value<QString>& v, QLineEdit* le)
{
le->setText(v);