From 4cc0ce7fd0e55b5f7c13d63defdb127f189c25a5 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 10 May 2016 06:59:55 +0200 Subject: compat/options: use auto connection type always I'm unsure whether the context object for QObject::connect overload we're using in enum support is treated as the connection's target thread at all. Docs are silent on this. In the meantime, no crashes or other anomalies observed, while violating Qt thread safety invariants resulted in immediate crashes beforehand. So let's use Qt::AutoConnection and not worry for the time being. --- opentrack-compat/options.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opentrack-compat/options.hpp b/opentrack-compat/options.hpp index 0cdacb28..cb40b705 100755 --- a/opentrack-compat/options.hpp +++ b/opentrack-compat/options.hpp @@ -214,7 +214,7 @@ namespace options { store(static_cast(datum)); return datum; } - static constexpr const Qt::ConnectionType DIRECT_CONNTYPE = Qt::UniqueConnection; + static constexpr const Qt::ConnectionType DIRECT_CONNTYPE = Qt::AutoConnection; static constexpr const Qt::ConnectionType SAFE_CONNTYPE = Qt::QueuedConnection; value(pbundle b, const QString& name, t def) : base_value(b, name), def(static_cast(def)) { @@ -310,12 +310,12 @@ namespace options { static_cast(&QComboBox::currentIndexChanged), &v, fn1(v, cb, enum_cases), - v.SAFE_CONNTYPE); + v.DIRECT_CONNTYPE); base_value::connect(&v, static_cast(&base_value::valueChanged), cb, fn2(v, cb, enum_cases), - v.SAFE_CONNTYPE); + v.DIRECT_CONNTYPE); } template<> -- cgit v1.2.3