aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/debugger/qqmlconfigurabledebugservice_p.h4
-rw-r--r--src/qml/jsapi/qjsengine_p.h4
-rw-r--r--src/qml/jsruntime/qv4executableallocator.cpp4
-rw-r--r--src/qml/jsruntime/qv4executableallocator_p.h2
-rw-r--r--src/qml/qml/qqmlmetatype.cpp4
-rw-r--r--src/qml/qml/qqmlmetatype_p.h4
6 files changed, 10 insertions, 12 deletions
diff --git a/src/qml/debugger/qqmlconfigurabledebugservice_p.h b/src/qml/debugger/qqmlconfigurabledebugservice_p.h
index 96ec46f475..38f41047c0 100644
--- a/src/qml/debugger/qqmlconfigurabledebugservice_p.h
+++ b/src/qml/debugger/qqmlconfigurabledebugservice_p.h
@@ -64,7 +64,7 @@ class QQmlConfigurableDebugService : public Base
{
protected:
QQmlConfigurableDebugService(float version, QObject *parent = nullptr) :
- Base(version, parent), m_configMutex(QMutex::Recursive)
+ Base(version, parent)
{
init();
}
@@ -103,7 +103,7 @@ protected:
emit Base::attachedToEngine(engine);
}
- QMutex m_configMutex;
+ QRecursiveMutex m_configMutex;
QList<QJSEngine *> m_waitingEngines;
bool m_waitingForConfiguration;
};
diff --git a/src/qml/jsapi/qjsengine_p.h b/src/qml/jsapi/qjsengine_p.h
index a77d710cff..164a70d000 100644
--- a/src/qml/jsapi/qjsengine_p.h
+++ b/src/qml/jsapi/qjsengine_p.h
@@ -74,7 +74,7 @@ public:
static const QJSEnginePrivate* get(const QJSEngine*e) { return e->d_func(); }
static QJSEnginePrivate* get(QV4::ExecutionEngine *e);
- QJSEnginePrivate() : mutex(QMutex::Recursive) {}
+ QJSEnginePrivate() = default;
~QJSEnginePrivate() override;
static void addToDebugServer(QJSEngine *q);
@@ -105,7 +105,7 @@ public:
};
// Shared by QQmlEngine
- mutable QMutex mutex;
+ mutable QRecursiveMutex mutex;
// These methods may be called from the QML loader thread
diff --git a/src/qml/jsruntime/qv4executableallocator.cpp b/src/qml/jsruntime/qv4executableallocator.cpp
index c836d121e3..7ee6f39aa2 100644
--- a/src/qml/jsruntime/qv4executableallocator.cpp
+++ b/src/qml/jsruntime/qv4executableallocator.cpp
@@ -147,9 +147,7 @@ bool ExecutableAllocator::ChunkOfPages::contains(Allocation *alloc) const
}
ExecutableAllocator::ExecutableAllocator()
- : mutex(QMutex::NonRecursive)
-{
-}
+ = default;
ExecutableAllocator::~ExecutableAllocator()
{
diff --git a/src/qml/jsruntime/qv4executableallocator_p.h b/src/qml/jsruntime/qv4executableallocator_p.h
index 013c6d7120..f98f2c7d33 100644
--- a/src/qml/jsruntime/qv4executableallocator_p.h
+++ b/src/qml/jsruntime/qv4executableallocator_p.h
@@ -130,7 +130,7 @@ public:
private:
QMultiMap<size_t, Allocation*> freeAllocations;
QMap<quintptr, ChunkOfPages*> chunks;
- mutable QMutex mutex;
+ mutable QRecursiveMutex mutex;
};
}
diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp
index f21427ff69..2c641d3845 100644
--- a/src/qml/qml/qqmlmetatype.cpp
+++ b/src/qml/qml/qqmlmetatype.cpp
@@ -60,7 +60,7 @@ struct LockedData : private QQmlMetaTypeData
};
Q_GLOBAL_STATIC(LockedData, metaTypeData)
-Q_GLOBAL_STATIC_WITH_ARGS(QMutex, metaTypeDataLock, (QMutex::Recursive))
+Q_GLOBAL_STATIC(QRecursiveMutex, metaTypeDataLock)
class QQmlMetaTypeDataPtr
{
@@ -804,7 +804,7 @@ QQmlType QQmlMetaType::typeForUrl(const QString &urlString,
return QQmlType();
}
-QMutex *QQmlMetaType::typeRegistrationLock()
+QRecursiveMutex *QQmlMetaType::typeRegistrationLock()
{
return metaTypeDataLock();
}
diff --git a/src/qml/qml/qqmlmetatype_p.h b/src/qml/qml/qqmlmetatype_p.h
index c2535a7fd5..6c2b0bb2a6 100644
--- a/src/qml/qml/qqmlmetatype_p.h
+++ b/src/qml/qml/qqmlmetatype_p.h
@@ -58,7 +58,7 @@
QT_BEGIN_NAMESPACE
class QQmlTypeModule;
-class QMutex;
+class QRecursiveMutex;
class QQmlError;
namespace QV4 { class ExecutableCompilationUnit; }
@@ -160,7 +160,7 @@ public:
static void prependCachedUnitLookupFunction(QQmlPrivate::QmlUnitCacheLookupFunction handler);
static void removeCachedUnitLookupFunction(QQmlPrivate::QmlUnitCacheLookupFunction handler);
- static QMutex *typeRegistrationLock();
+ static QRecursiveMutex *typeRegistrationLock();
static QString prettyTypeName(const QObject *object);