Commit 281161c2 authored by Fawzi Mohamed's avatar Fawzi Mohamed
Browse files

qmljs: improve multithreading safety

ensure that the QSet copy operation of the scannedPaths in importScan
is atomic.

Change-Id: Ifb3566a86d1d6ac6abf29f1b4cbe19868947d0cc
Reviewed-by: default avatarThomas Hartmann <>
parent bd3366d8
......@@ -947,7 +947,11 @@ void ModelManagerInterface::importScan(QFutureInterface<void> &future,
bool emitDocChangedOnDisk)
// paths we have scanned for files and added to the files list
QSet<QString> scannedPaths = modelManager->m_scannedPaths;
QSet<QString> scannedPaths;
QMutexLocker l(&modelManager->m_mutex);
scannedPaths = modelManager->m_scannedPaths;
// libraries we've found while scanning imports
QSet<QString> newLibraries;
Markdown is supported
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