summaryrefslogtreecommitdiffhomepage
path: root/options/bundle.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-03-02 00:26:14 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-03-02 00:26:14 +0100
commit19d2b71aa8f385fee0c4cd3aa9fdf4f2f3279749 (patch)
tree632d75ea7d1663ff003a312989704e1d2fc6e8df /options/bundle.cpp
parentf5ce4029d6f5c0659eba8dedbd5238527867460b (diff)
options: consistently use rvalue references
Diffstat (limited to 'options/bundle.cpp')
-rw-r--r--options/bundle.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/options/bundle.cpp b/options/bundle.cpp
index a17b04fb..20cc5d90 100644
--- a/options/bundle.cpp
+++ b/options/bundle.cpp
@@ -67,7 +67,7 @@ void bundle::set_all_to_default()
connector::set_all_to_default_();
}
-void bundle::store_kv(const QString& name, const QVariant& new_value)
+void bundle::store_kv(const QString& name, QVariant&& value)
{
if (group_name.isEmpty())
return;
@@ -75,13 +75,21 @@ void bundle::store_kv(const QString& name, const QVariant& new_value)
{
mark_ini_modified();
QMutexLocker l{&mtx};
- transient.put(name, new_value);
+ transient.put(name, value);
connector::notify_values(name);
}
emit changed();
}
+void bundle::store_kv(const QString& name, const QVariant& value)
+{
+ if (group_name.isEmpty())
+ return;
+
+ store_kv(name, QVariant{value});
+}
+
QVariant bundle::get_variant(const QString& name) const
{
QMutexLocker l{&mtx};