diff options
-rw-r--r-- | options/tie.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/options/tie.cpp b/options/tie.cpp index c2976217..adf26b53 100644 --- a/options/tie.cpp +++ b/options/tie.cpp @@ -28,8 +28,12 @@ void tie_setting(value<QString>& v, QComboBox* cb) { cb->setCurrentText(v); v = cb->currentText(); - value_::connect(cb, SIGNAL(currentTextChanged(QString)), &v, SLOT(setValue(const QString&)), v.DIRECT_CONNTYPE); - value_::connect(&v, SIGNAL(valueChanged(const QString&)), cb, SLOT(setCurrentText(const QString&)), v.SAFE_CONNTYPE); + auto set_current_text = [cb, &v](const QString& str) { + cb->setCurrentText(str); + v = cb->currentText(); + }; + value_::connect(cb, &QComboBox::currentTextChanged, &v, v.value_changed<QString>(), v.DIRECT_CONNTYPE); + value_::connect(&v, v.value_changed<QString>(), cb, set_current_text, v.SAFE_CONNTYPE); } void tie_setting(value<QVariant>& v, QComboBox* cb) |