summaryrefslogtreecommitdiffhomepage
path: root/options/bundle.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-03-21 08:22:36 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-03-21 08:22:36 +0100
commitca847749c03b88d8e482396a9c4311ef02b054b9 (patch)
treec8237b2d8385f922acdb5563e417737feba3adfb /options/bundle.cpp
parentfd0305aeecfad05f855b7d0e09a1eb9a70f4b2e5 (diff)
options/{bundle,connector,value}: allow setting to default values
This is complicated by Qt's rejection of template classes. Also move some stuff to slots where makes sense.
Diffstat (limited to 'options/bundle.cpp')
-rw-r--r--options/bundle.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/options/bundle.cpp b/options/bundle.cpp
index 1eb69b60..0bfeef3b 100644
--- a/options/bundle.cpp
+++ b/options/bundle.cpp
@@ -49,6 +49,11 @@ void bundle::reload(std::shared_ptr<QSettings> settings)
}
}
+void bundle::set_all_to_default()
+{
+ forall([](const QString&, base_value* val) { set_base_value_to_default(val); });
+}
+
void bundle::store_kv(const QString& name, const QVariant& datum)
{
QMutexLocker l(&mtx);