summaryrefslogtreecommitdiffhomepage
path: root/options
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2025-04-25 08:01:32 +0200
committerStanislaw Halik <sthalik@misaki.pl>2025-05-16 08:54:13 +0200
commit78f8c6c81c2e900aa1cb433940667a054cc0b6ed (patch)
treeb03c5c96e1d45645a5528d2007f343f21bd46f48 /options
parent1f737463587fec21337631bc0320718b49fde26c (diff)
buffer flush
Diffstat (limited to 'options')
-rw-r--r--options/bundle.hpp9
-rw-r--r--options/connector.hpp4
-rw-r--r--options/globals.hpp4
-rw-r--r--options/metatype.cpp1
4 files changed, 8 insertions, 10 deletions
diff --git a/options/bundle.hpp b/options/bundle.hpp
index 158fcef9..c97eeff2 100644
--- a/options/bundle.hpp
+++ b/options/bundle.hpp
@@ -21,7 +21,7 @@
#include <QObject>
#include <QString>
#include <QVariant>
-#include <QMutex>
+#include <QRecursiveMutex>
#include <QDebug>
@@ -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 };
+ QRecursiveMutex implsgl_mtx;
std::unordered_map<k, weak> implsgl_data {};
void notify_();
@@ -114,4 +114,3 @@ private:
void set_value_to_default(value_* val);
} // ns options::detail
-
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 <vector>
#include <QString>
-#include <QMutex>
+#include <QRecursiveMutex>
#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 af242dc9..1a92cc47 100644
--- a/options/globals.hpp
+++ b/options/globals.hpp
@@ -7,7 +7,7 @@
#include <QString>
#include <QSettings>
-#include <QMutex>
+#include <QRecursiveMutex>
namespace options::globals::detail {
@@ -17,7 +17,7 @@ struct OTR_OPTIONS_EXPORT ini_ctx
{
std::optional<QSettings> 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 7430c00a..f85429e0 100644
--- a/options/metatype.cpp
+++ b/options/metatype.cpp
@@ -6,7 +6,6 @@ template<typename t>
void declare_metatype_for_type(const char* str)
{
qRegisterMetaType<t>(str);
- qRegisterMetaTypeStreamOperators<t>();
}
} // ns options::detail