summaryrefslogtreecommitdiffhomepage
path: root/compat/mutex.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-12-20 18:30:37 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-12-24 19:31:24 +0100
commitea29ea8095e1fe6e7c1766f87aea33650a1a485d (patch)
treeb6a908b371b7139d4f58be814f1de44807bb5f98 /compat/mutex.hpp
parent0fbca6ba484194a9c16c43bc93d70590702c0a99 (diff)
compat/mutex: rename
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;
+};