summaryrefslogtreecommitdiffhomepage
path: root/compat/mutex.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'compat/mutex.hpp')
-rw-r--r--compat/mutex.hpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/compat/mutex.hpp b/compat/mutex.hpp
new file mode 100644
index 00000000..37e6802b
--- /dev/null
+++ b/compat/mutex.hpp
@@ -0,0 +1,23 @@
+#pragma once
+
+#include <QMutex>
+
+#include "export.hpp"
+
+class OTR_COMPAT_EXPORT mutex
+{
+ mutable QMutex inner;
+
+public:
+ using RecursionMode = QMutex::RecursionMode;
+ static constexpr inline RecursionMode Recursive = RecursionMode::Recursive;
+ static constexpr inline RecursionMode NonRecursive = RecursionMode::NonRecursive;
+
+ mutex& operator=(const mutex& datum);
+ mutex(const mutex& datum);
+ explicit mutex(RecursionMode m);
+
+ QMutex* operator&() const;
+ operator QMutex*() const;
+ QMutex* operator->() const;
+};