#include <config.h>
-#include "mutex.h"
+#include "support/mutex.h"
#include <QMutex>
struct Mutex::Private
{
+#if QT_VERSION < 0x060000
// QMutex::Recursive: less risks for dead-locks
Private() : qmutex_(QMutex::Recursive)
{
}
QMutex qmutex_;
+#else
+ Private() : qmutex_()
+ {
+ }
+
+ QRecursiveMutex qmutex_;
+#endif
};
}
-// It makes no sense to copy the mutex,
-// each instance has its own QMutex,
-// therefore nothing to copy!
-// TODO review
-Mutex::Mutex(const Mutex&) : d(new Private)
-{
-}
-
-
-Mutex& Mutex::operator=(const Mutex&)
-{
- return *this;
-}
-
-
-
Mutex::Locker::Locker(Mutex* mtx) : mutex_(mtx)
{
mutex_->d->qmutex_.lock();