diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-09-09 15:18:26 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-09-09 18:33:30 +0200 |
commit | 078059915bdb39726924ef5bfed159c8dcf2af6c (patch) | |
tree | 4772c907c2a4e0c4ab2df0b3b4464e1f848902c9 /options/bundle.cpp | |
parent | 96687dbf37b2aa2fc05a85a312ab573e64923879 (diff) |
options/{bundle,group}: don't create QSettings all the time
Diffstat (limited to 'options/bundle.cpp')
-rw-r--r-- | options/bundle.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/options/bundle.cpp b/options/bundle.cpp index 61be509a..876599ce 100644 --- a/options/bundle.cpp +++ b/options/bundle.cpp @@ -20,12 +20,12 @@ bundle::~bundle() { } -void bundle::reload() +void bundle::reload(std::shared_ptr<QSettings> settings) { if (group_name.size()) { QMutexLocker l(&mtx); - saved = group(group_name); + saved = group(group_name, settings); const bool has_changes = is_modified(false); transient = saved; @@ -128,6 +128,8 @@ void bundler::after_profile_changed_() { QMutexLocker l(&implsgl_mtx); + std::shared_ptr<QSettings> s = group::ini_file(); + for (auto& kv : implsgl_data) { tt& tuple = kv.second; @@ -137,7 +139,7 @@ void bundler::after_profile_changed_() if (bundle_) { //qDebug() << "bundle: reverting" << kv.first << "due to profile change"; - bundle_->reload(); + bundle_->reload(s); } } } |