summaryrefslogtreecommitdiffhomepage
path: root/gui
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-01-16 05:58:48 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-01-16 07:49:13 +0100
commit03d28dde1635e36508cff1f9eabc265cdb5febb9 (patch)
treeee62d5851315c7b4c2c3c05f8a72e29a6dd4a1e8 /gui
parentf8faca0abecafd6e65d07bd0fdd618070114cdfa (diff)
compat/mutex: remove
Always use the adaptive QMutex.
Diffstat (limited to 'gui')
-rw-r--r--gui/init.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/gui/init.cpp b/gui/init.cpp
index 5ed4ca00..07f6c6b1 100644
--- a/gui/init.cpp
+++ b/gui/init.cpp
@@ -27,6 +27,7 @@ using namespace options;
#include <QFileDialog>
#include <QString>
#include <QOperatingSystemVersion>
+#include <QMutex>
#include <QDebug>
@@ -101,7 +102,6 @@ static void set_qt_style()
#endif
}
-#include "compat/spinlock.hpp"
#include <string>
#ifdef _WIN32
@@ -118,8 +118,8 @@ static void qdebug_to_console(QtMsgType, const QMessageLogContext& ctx, const QS
if (IsDebuggerPresent())
{
- static std::atomic_flag lock = ATOMIC_FLAG_INIT;
- spinlock_guard l(lock);
+ static QMutex lock;
+ QMutexLocker l(&lock);
const wchar_t* const bytes = (const wchar_t*)msg.utf16();