diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-05-10 06:59:55 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-05-10 06:59:55 +0200 |
commit | 4cc0ce7fd0e55b5f7c13d63defdb127f189c25a5 (patch) | |
tree | 91d4b250c5d13e06de7836ecb4a01c1e89800ad3 /opentrack-compat | |
parent | a11524bfb0b15155b8eb2583548923936a86423e (diff) |
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.
Diffstat (limited to 'opentrack-compat')
-rwxr-xr-x | opentrack-compat/options.hpp | 6 |
1 files 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<underlying_t>(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<underlying_t>(def)) { @@ -310,12 +310,12 @@ namespace options { static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), &v, fn1(v, cb, enum_cases), - v.SAFE_CONNTYPE); + v.DIRECT_CONNTYPE); base_value::connect(&v, static_cast<void (base_value::*)(int)>(&base_value::valueChanged), cb, fn2(v, cb, enum_cases), - v.SAFE_CONNTYPE); + v.DIRECT_CONNTYPE); } template<> |