CppEditor: remove superfluous locker in model manager

This locker potentially results in a freeze since the called projectPart
might require to lock for writing, which is not possible if the read
locker is still there. Additionally there is nothing we would need the
lock for in projectPartFromDependencies.

Change-Id: If957edfb4ebc45e18141cb14a63bf9567242cc48
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
David Schulz
2023-09-13 10:29:05 +02:00
parent 1870501443
commit f491d93d2a

View File

@@ -1660,7 +1660,6 @@ QList<ProjectPart::ConstPtr> CppModelManager::projectPartFromDependencies(
QSet<ProjectPart::ConstPtr> parts; QSet<ProjectPart::ConstPtr> parts;
const FilePaths deps = snapshot().filesDependingOn(fileName); const FilePaths deps = snapshot().filesDependingOn(fileName);
QReadLocker locker(&d->m_projectLock);
for (const FilePath &dep : deps) for (const FilePath &dep : deps)
parts.unite(Utils::toSet(projectPart(dep))); parts.unite(Utils::toSet(projectPart(dep)));