summaryrefslogtreecommitdiffhomepage
path: root/options/bundle.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-07-08 23:29:49 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-07-08 23:29:49 +0200
commitfa1801471c2708ed8266ec7b99bd4cec886ccc1b (patch)
treeaa56218c2c7e4939aaf11a2046b0f12760326545 /options/bundle.hpp
parent90940a774eab876c38d5cef981b4be5bae67a462 (diff)
options: fix 2 issues
1. Calling valueChanged didn't invoke machinery in value<t>, only base_value aka value_. There's a fast path in value<t>::type() despite the pessimization. 2. Split global scope stuff into options::globals from the options::globals stuff 3. Adjust usages
Diffstat (limited to 'options/bundle.hpp')
-rw-r--r--options/bundle.hpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/options/bundle.hpp b/options/bundle.hpp
index a12a335c..98291fc5 100644
--- a/options/bundle.hpp
+++ b/options/bundle.hpp
@@ -48,7 +48,7 @@ class OTR_OPTIONS_EXPORT bundle final : public QObject, public connector
class OTR_OPTIONS_EXPORT mutex final : public QMutex
{
public:
- mutex(QMutex::RecursionMode mode) : QMutex(mode) {}
+ explicit mutex(QMutex::RecursionMode mode) : QMutex(mode) {}
operator QMutex*() const { return const_cast<QMutex*>(static_cast<const QMutex*>(this)); }
};
@@ -70,7 +70,7 @@ public:
bundle& operator=(const bundle&) = delete;
QMutex* get_mtx() const override;
- cc_noinline bundle(const QString& group_name);
+ cc_noinline explicit bundle(const QString& group_name);
cc_noinline ~bundle() override;
QString name() const { return group_name; }
cc_noinline void store_kv(const QString& name, const QVariant& datum);
@@ -83,6 +83,7 @@ public:
QMutexLocker l(mtx);
return transient.get<t>(name);
}
+
public slots:
void save();
void reload();
@@ -97,7 +98,7 @@ struct OTR_OPTIONS_EXPORT bundler final
using shared = std::shared_ptr<v>;
private:
- QMutex implsgl_mtx;
+ QMutex implsgl_mtx { QMutex::Recursive };
std::map<k, weak> implsgl_data;
void after_profile_changed_();