Commit fe56f36d authored by Volker Krause's avatar Volker Krause
Browse files

Port to QRecursiveMutex

Recursive and non-recursive mutexes are distinct types in Qt6.
parent ce22e95d
Pipeline #148311 passed with stage
in 25 minutes and 49 seconds
......@@ -126,7 +126,6 @@ Connection::Connection(Context *input, QObject *parent)
: QObject(parent)
, m_input(input)
, m_notifier(nullptr)
, m_mutex(QMutex::Recursive)
{
Q_ASSERT(m_input);
// need to connect to KGlobalSettings as the mouse KCM does not emit a dedicated signal
......
......@@ -16,7 +16,7 @@
#include <QObject>
#include <QPointer>
#include <QSize>
#include <QMutex>
#include <QRecursiveMutex>
#include <QVector>
#include <QStringList>
......@@ -67,7 +67,7 @@ private:
void applyScreenToDevice(Device *device);
Context *m_input;
QSocketNotifier *m_notifier;
QMutex m_mutex;
QRecursiveMutex m_mutex;
QVector<Event*> m_eventQueue;
QVector<Device*> m_devices;
KSharedConfigPtr m_config;
......
......@@ -626,7 +626,7 @@ KWin::Scripting *KWin::Scripting::create(QObject *parent)
KWin::Scripting::Scripting(QObject *parent)
: QObject(parent)
, m_scriptsLock(new QMutex(QMutex::Recursive))
, m_scriptsLock(new QRecursiveMutex)
, m_qmlEngine(new QQmlEngine(this))
, m_declarativeScriptSharedContext(new QQmlContext(m_qmlEngine, this))
, m_workspaceWrapper(new QtScriptWorkspaceWrapper(this))
......
......@@ -28,7 +28,7 @@ class QQmlContext;
class QQmlEngine;
class QAction;
class QMenu;
class QMutex;
class QRecursiveMutex;
class QQuickWindow;
class KConfigGroup;
......@@ -315,7 +315,7 @@ private:
/**
* Lock to protect the scripts member variable.
*/
QScopedPointer<QMutex> m_scriptsLock;
QScopedPointer<QRecursiveMutex> m_scriptsLock;
// Preferably call ONLY at load time
void runScripts();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment