Port to QRecursiveMutex
Recursive and non-recursive mutexes are distinct types in Qt6.
This commit is contained in:
parent
ce22e95d89
commit
fe56f36dd0
4 changed files with 5 additions and 6 deletions
|
@ -126,7 +126,6 @@ Connection::Connection(Context *input, QObject *parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
, m_input(input)
|
, m_input(input)
|
||||||
, m_notifier(nullptr)
|
, m_notifier(nullptr)
|
||||||
, m_mutex(QMutex::Recursive)
|
|
||||||
{
|
{
|
||||||
Q_ASSERT(m_input);
|
Q_ASSERT(m_input);
|
||||||
// need to connect to KGlobalSettings as the mouse KCM does not emit a dedicated signal
|
// need to connect to KGlobalSettings as the mouse KCM does not emit a dedicated signal
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
#include <QSize>
|
#include <QSize>
|
||||||
#include <QMutex>
|
#include <QRecursiveMutex>
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ private:
|
||||||
void applyScreenToDevice(Device *device);
|
void applyScreenToDevice(Device *device);
|
||||||
Context *m_input;
|
Context *m_input;
|
||||||
QSocketNotifier *m_notifier;
|
QSocketNotifier *m_notifier;
|
||||||
QMutex m_mutex;
|
QRecursiveMutex m_mutex;
|
||||||
QVector<Event*> m_eventQueue;
|
QVector<Event*> m_eventQueue;
|
||||||
QVector<Device*> m_devices;
|
QVector<Device*> m_devices;
|
||||||
KSharedConfigPtr m_config;
|
KSharedConfigPtr m_config;
|
||||||
|
|
|
@ -626,7 +626,7 @@ KWin::Scripting *KWin::Scripting::create(QObject *parent)
|
||||||
|
|
||||||
KWin::Scripting::Scripting(QObject *parent)
|
KWin::Scripting::Scripting(QObject *parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
, m_scriptsLock(new QMutex(QMutex::Recursive))
|
, m_scriptsLock(new QRecursiveMutex)
|
||||||
, m_qmlEngine(new QQmlEngine(this))
|
, m_qmlEngine(new QQmlEngine(this))
|
||||||
, m_declarativeScriptSharedContext(new QQmlContext(m_qmlEngine, this))
|
, m_declarativeScriptSharedContext(new QQmlContext(m_qmlEngine, this))
|
||||||
, m_workspaceWrapper(new QtScriptWorkspaceWrapper(this))
|
, m_workspaceWrapper(new QtScriptWorkspaceWrapper(this))
|
||||||
|
|
|
@ -28,7 +28,7 @@ class QQmlContext;
|
||||||
class QQmlEngine;
|
class QQmlEngine;
|
||||||
class QAction;
|
class QAction;
|
||||||
class QMenu;
|
class QMenu;
|
||||||
class QMutex;
|
class QRecursiveMutex;
|
||||||
class QQuickWindow;
|
class QQuickWindow;
|
||||||
class KConfigGroup;
|
class KConfigGroup;
|
||||||
|
|
||||||
|
@ -315,7 +315,7 @@ private:
|
||||||
/**
|
/**
|
||||||
* Lock to protect the scripts member variable.
|
* Lock to protect the scripts member variable.
|
||||||
*/
|
*/
|
||||||
QScopedPointer<QMutex> m_scriptsLock;
|
QScopedPointer<QRecursiveMutex> m_scriptsLock;
|
||||||
|
|
||||||
// Preferably call ONLY at load time
|
// Preferably call ONLY at load time
|
||||||
void runScripts();
|
void runScripts();
|
||||||
|
|
Loading…
Reference in a new issue