diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-17 23:50:51 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-17 23:51:14 +0200 |
commit | 93d6e7a6b8d135365a0f073098ba97f905d2c550 (patch) | |
tree | aae77f89c09521b1d2e19dd2ad00ea28299a0581 /spline-widget | |
parent | 1a7b39fcd77ee82450d591357ea336f956d49734 (diff) |
options: support deferred writes when saving bundles
The mapping window has 13 bundles total in use. Setting them all can take up
to a large fraction of a second on some windows filesystems. Do a single
config write instead.
Diffstat (limited to 'spline-widget')
-rw-r--r-- | spline-widget/spline.cpp | 9 | ||||
-rw-r--r-- | spline-widget/spline.hpp | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/spline-widget/spline.cpp b/spline-widget/spline.cpp index da67f0d4..c71076f4 100644 --- a/spline-widget/spline.cpp +++ b/spline-widget/spline.cpp @@ -254,10 +254,15 @@ void spline::reload() s->b->reload(); } -void spline::save() +void spline::save(QSettings& settings) { if (s && s->b) - s->b->save(); + s->b->save_deferred(settings); +} + +void spline::save() +{ + save(*group::ini_file()); } void spline::set_bundle(bundle b) diff --git a/spline-widget/spline.hpp b/spline-widget/spline.hpp index 4f6531b9..5b0b3afc 100644 --- a/spline-widget/spline.hpp +++ b/spline-widget/spline.hpp @@ -70,6 +70,7 @@ private: public: void reload(); + void save(QSettings& s); void save(); void set_bundle(bundle b); |