summaryrefslogtreecommitdiffhomepage
path: root/options
diff options
context:
space:
mode:
Diffstat (limited to 'options')
-rw-r--r--options/value.hpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/options/value.hpp b/options/value.hpp
index 940e2a15..f16878ce 100644
--- a/options/value.hpp
+++ b/options/value.hpp
@@ -62,6 +62,9 @@ class value final : public value_
if (traits::is_equal(get(), traits::value_from_qvariant(value)))
return;
+ if (is_null())
+ return;
+
if (value.isValid() && !value.isNull())
b->store_kv(self_name, value);
else
@@ -97,12 +100,18 @@ public:
auto& operator=(t&& datum) noexcept
{
+ if (is_null())
+ return *this;
+
store_variant(traits::qvariant_from_value(traits::pass_value(datum)));
return *this;
}
auto& operator=(const t& datum) noexcept
{
+ if (is_null())
+ return *this;
+
t copy{datum};
*this = std::move(copy);
return *this;
@@ -121,7 +130,8 @@ public:
{
}
- value(const value<t>& other) noexcept : value{other.b, other.self_name, other.def} {}
+ //value(const value<t>& other) noexcept : value{other.b, other.self_name, other.def} {}
+ value(const value<t>&) = delete;
t default_value() const
{