summaryrefslogtreecommitdiffhomepage
path: root/opentrack/qcopyable-mutex.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-07-25 07:27:03 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-07-25 07:49:19 +0200
commit24538cf3a3a91481851618791b11be81437563e4 (patch)
tree4bcc9b97721170829038fe778633382c3e8754bc /opentrack/qcopyable-mutex.hpp
parent0f445ac2661b5454d491936bb780196b13d1f4ea (diff)
move portability classes to compat library
Diffstat (limited to 'opentrack/qcopyable-mutex.hpp')
-rw-r--r--opentrack/qcopyable-mutex.hpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/opentrack/qcopyable-mutex.hpp b/opentrack/qcopyable-mutex.hpp
deleted file mode 100644
index f7f36f93..00000000
--- a/opentrack/qcopyable-mutex.hpp
+++ /dev/null
@@ -1,37 +0,0 @@
-#pragma once
-
-#include <QMutex>
-
-class MyMutex {
-private:
- QMutex inner;
-
-public:
- QMutex* operator->() { return &inner; }
- QMutex* operator->() const { return &const_cast<MyMutex*>(this)->inner; }
-
- MyMutex operator=(const MyMutex& datum)
- {
- auto mode =
- datum->isRecursive()
- ? QMutex::Recursive
- : QMutex::NonRecursive;
-
- return MyMutex(mode);
- }
-
- MyMutex(const MyMutex& datum)
- {
- *this = datum;
- }
-
- MyMutex(QMutex::RecursionMode mode = QMutex::NonRecursive) :
- inner(mode)
- {
- }
-
- QMutex* operator&()
- {
- return &inner;
- }
-};