diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-06-09 10:55:36 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-06-10 10:06:27 +0200 |
commit | 334f8674b25c8086b2cd2660cc159030867c0a00 (patch) | |
tree | c5d2588f70217bcd720b826819a67f8ae010139e /src/qml/qml/qqmltypemodule.cpp | |
parent | 60c657e0878d359df6089af699ea671ccea0e143 (diff) |
Lock the mutex when accessing QQmlTypeModule::m_imports
The type modules are passed around in various places.
Change-Id: I59b2fec80a3ae25799116533635545229d3841da
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmltypemodule.cpp')
-rw-r--r-- | src/qml/qml/qqmltypemodule.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qml/qml/qqmltypemodule.cpp b/src/qml/qml/qqmltypemodule.cpp index 6bc134efa9..f700f4c01a 100644 --- a/src/qml/qml/qqmltypemodule.cpp +++ b/src/qml/qml/qqmltypemodule.cpp @@ -125,16 +125,19 @@ void QQmlTypeModule::walkCompositeSingletons(const std::function<void(const QQml QStringList QQmlTypeModule::imports() const { + QMutexLocker lock(&m_mutex); return m_imports; } void QQmlTypeModule::addImport(const QString &import) { + QMutexLocker lock(&m_mutex); m_imports.append(import); } void QQmlTypeModule::removeImport(const QString &import) { + QMutexLocker lock(&m_mutex); m_imports.removeAll(import); } |