summaryrefslogtreecommitdiffhomepage
path: root/options/tie.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'options/tie.cpp')
-rw-r--r--options/tie.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/options/tie.cpp b/options/tie.cpp
index 3cb32319..162a0f56 100644
--- a/options/tie.cpp
+++ b/options/tie.cpp
@@ -22,8 +22,8 @@ OTR_OPTIONS_EXPORT void tie_setting(value<QString>& v, QComboBox* cb)
{
cb->setCurrentText(v);
v = cb->currentText();
- base_value::connect(cb, SIGNAL(currentTextChanged(QString)), &v, SLOT(setValue(QString)), v.DIRECT_CONNTYPE);
- base_value::connect(&v, SIGNAL(valueChanged(QString)), cb, SLOT(setCurrentText(QString)), v.SAFE_CONNTYPE);
+ base_value::connect(cb, SIGNAL(currentTextChanged(QString)), &v, SLOT(setValue(const QString&)), v.DIRECT_CONNTYPE);
+ base_value::connect(&v, SIGNAL(valueChanged(const QString&)), cb, SLOT(setCurrentText(const QString&)), v.SAFE_CONNTYPE);
}
OTR_OPTIONS_EXPORT void tie_setting(value<QVariant>& v, QComboBox* cb)
@@ -55,7 +55,7 @@ OTR_OPTIONS_EXPORT void tie_setting(value<QVariant>& v, QComboBox* cb)
&v, [cb, &v](int idx) {
v = cb->itemData(idx);
}, v.DIRECT_CONNTYPE);
- base_value::connect(&v, static_cast<void(base_value::*)(const QVariant&) const>(&base_value::valueChanged),
+ base_value::connect(&v, base_value::signal_fun<QVariant>(),
cb,
[cb, set_idx](const QVariant& var) {
run_in_thread_sync(cb, [&]() {
@@ -91,21 +91,21 @@ OTR_OPTIONS_EXPORT void tie_setting(value<int>& v, QSlider* sl)
{
sl->setValue(v);
v = sl->value();
- base_value::connect(sl, SIGNAL(valueChanged(int)), &v, SLOT(setValue(int)), v.DIRECT_CONNTYPE);
- base_value::connect(&v, SIGNAL(valueChanged(int)), sl, SLOT(setValue(int)), v.SAFE_CONNTYPE);
+ 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);
base_value::connect(le, SIGNAL(textChanged(QString)), &v, SLOT(setValue(QString)), v.DIRECT_CONNTYPE);
- base_value::connect(&v, SIGNAL(valueChanged(QString)),le, SLOT(setText(QString)), v.SAFE_CONNTYPE);
+ base_value::connect(&v, base_value::signal_fun<QString>(), le, &QLineEdit::setText, v.SAFE_CONNTYPE);
}
OTR_OPTIONS_EXPORT void tie_setting(value<QString>& v, QLabel* lb)
{
lb->setText(v);
- base_value::connect(&v, SIGNAL(valueChanged(QString)), lb, SLOT(setText(QString)), v.SAFE_CONNTYPE);
+ base_value::connect(&v, base_value::signal_fun<QString>(), lb, &QLabel::setText, v.SAFE_CONNTYPE);
}
OTR_OPTIONS_EXPORT void tie_setting(value<int>& v, QTabWidget* t)
@@ -141,7 +141,7 @@ OTR_OPTIONS_EXPORT void tie_setting(value<slider_value>& v, QSlider* w)
v.DIRECT_CONNTYPE);
base_value::connect(&v,
- static_cast<void(base_value::*)(const slider_value&) const>(&base_value::valueChanged),
+ base_value::signal_fun<slider_value>(),
w,
[=, &v](double) {
run_in_thread_sync(w, [=, &v]()