From eded65bbcabd8e2267ef3a1d7df467ab403b27e0 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 29 Jul 2021 15:55:09 +0200 Subject: to rebase --- options/bundle.hpp | 8 ++++---- options/connector.hpp | 4 ++-- options/globals.hpp | 4 ++-- options/metatype.cpp | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'options') diff --git a/options/bundle.hpp b/options/bundle.hpp index 158fcef9..58324e79 100644 --- a/options/bundle.hpp +++ b/options/bundle.hpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include @@ -46,7 +46,7 @@ class OTR_OPTIONS_EXPORT bundle final : public QObject, public connector friend struct bundler; - mutable QMutex mtx { QMutex::Recursive }; + mutable QRecursiveMutex mtx; const QString group_name; group saved; group transient; @@ -62,7 +62,7 @@ public: bundle(const bundle&) = delete; bundle& operator=(const bundle&) = delete; - QMutex* get_mtx() const override { return &mtx; } + QRecursiveMutex* get_mtx() const override { return &mtx; } QString name() const { return group_name; } explicit bundle(const QString& group_name); @@ -93,7 +93,7 @@ struct OTR_OPTIONS_EXPORT bundler final static void reload(); private: - QMutex implsgl_mtx { QMutex::Recursive }; + mutable QRecursiveMutex implsgl_mtx; std::unordered_map implsgl_data {}; void notify_(); diff --git a/options/connector.hpp b/options/connector.hpp index 025efda2..bcac5676 100644 --- a/options/connector.hpp +++ b/options/connector.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include "export.hpp" @@ -38,7 +38,7 @@ class OTR_OPTIONS_EXPORT connector protected: void notify_values(const QString& name) const; void notify_all_values() const; - virtual QMutex* get_mtx() const = 0; + virtual QRecursiveMutex* get_mtx() const = 0; void set_all_to_default_(); public: diff --git a/options/globals.hpp b/options/globals.hpp index 7af6533d..e0146a43 100644 --- a/options/globals.hpp +++ b/options/globals.hpp @@ -7,7 +7,7 @@ #include #include -#include +#include namespace options::globals::detail { @@ -17,7 +17,7 @@ struct OTR_OPTIONS_EXPORT ini_ctx { std::optional qsettings { std::in_place }; QString pathname; - QMutex mtx { QMutex::Recursive }; + QRecursiveMutex mtx; unsigned refcount = 0; bool modifiedp = false; diff --git a/options/metatype.cpp b/options/metatype.cpp index 7962b81b..c444edc3 100644 --- a/options/metatype.cpp +++ b/options/metatype.cpp @@ -7,7 +7,7 @@ template void declare_metatype_for_type(const char* str) { qRegisterMetaType(str); - qRegisterMetaTypeStreamOperators(); + //qRegisterMetaTypeStreamOperators(); } } // ns options::detail -- cgit v1.2.3