summaryrefslogtreecommitdiffhomepage
path: root/options/value.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'options/value.hpp')
-rw-r--r--options/value.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/options/value.hpp b/options/value.hpp
index 37a2f317..1da1dd9c 100644
--- a/options/value.hpp
+++ b/options/value.hpp
@@ -48,10 +48,12 @@ class value final : public base_value
if (self_name.isEmpty())
return def;
- if (!b->contains(self_name) || b->get<QVariant>(self_name).type() == QVariant::Invalid)
+ QVariant variant = b->get<QVariant>(self_name);
+
+ if (!b->contains(self_name) || variant.type() == QVariant::Invalid)
return def;
- const element_type x(b->get<element_type>(self_name));
+ const element_type x(variant.value<element_type>());
return traits::from_value(traits::from_storage(x), def);
}