summaryrefslogtreecommitdiffhomepage
path: root/options
diff options
context:
space:
mode:
Diffstat (limited to 'options')
-rw-r--r--options/base-value.cpp2
-rw-r--r--options/tie.cpp8
-rw-r--r--options/value.hpp1
3 files changed, 8 insertions, 3 deletions
diff --git a/options/base-value.cpp b/options/base-value.cpp
index 9ccbbdf8..950629d0 100644
--- a/options/base-value.cpp
+++ b/options/base-value.cpp
@@ -29,5 +29,5 @@ value_::~value_()
void value_::maybe_trace(const char* str) const
{
if (TRACE_NOTIFY)
- qDebug().noquote() << str << QThread::currentThreadId() << b->name() << self_name;
+ qDebug().noquote() << str << QThread::currentThreadId() << b->name() << self_name << get_variant();
}
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)
diff --git a/options/value.hpp b/options/value.hpp
index dacd0ea9..9a7487b8 100644
--- a/options/value.hpp
+++ b/options/value.hpp
@@ -137,6 +137,7 @@ public:
return *this;
store_variant(traits::qvariant_from_value(traits::pass_value(datum)));
+ maybe_trace("set-value");
return *this;
}