diff options
Diffstat (limited to 'options')
-rw-r--r-- | options/connector.cpp | 7 | ||||
-rw-r--r-- | options/group.cpp | 4 | ||||
-rw-r--r-- | options/scoped.cpp | 2 |
3 files changed, 8 insertions, 5 deletions
diff --git a/options/connector.cpp b/options/connector.cpp index 63d70ca7..075a57e1 100644 --- a/options/connector.cpp +++ b/options/connector.cpp @@ -83,11 +83,12 @@ void connector::on_value_created(const QString& name, value_type val) QMutexLocker l(get_mtx()); - if (on_value_destructed_impl(name, val)) + int i = 1; + while (on_value_destructed_impl(name, val)) { qWarning() << "options/connector: value created twice;" - << "bundle" - << val->b->name() + << "cnt" << i++ + << "bundle" << val->b->name() << "value-name" << name << "value-ptr" << quintptr(val); } diff --git a/options/group.cpp b/options/group.cpp index 3f800ff0..60e8a7b4 100644 --- a/options/group.cpp +++ b/options/group.cpp @@ -30,7 +30,9 @@ group::group(const QString& name) : name(name) { auto tmp = k_.toUtf8(); QString k(tmp); - kvs[k] = conf.value(k_); + QVariant val = conf.value(k_); + if (val.type() != QVariant::Invalid) + kvs[k] = std::move(val); } conf.endGroup(); }); diff --git a/options/scoped.cpp b/options/scoped.cpp index 96f4a261..58a4ee02 100644 --- a/options/scoped.cpp +++ b/options/scoped.cpp @@ -2,8 +2,8 @@ #include <QApplication> #include <QThread> -// for std::abort() #include <cstdlib> +#include <atomic> #include <QDebug> |