CMakePM: Fix concurrent access crash

Change-Id: I9ea11619860d4066cb06dfd4a60def8208f21add
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Cristian Adam
2023-09-28 15:48:11 +02:00
parent 32001b7e2a
commit 7235e977ff
2 changed files with 18 additions and 7 deletions

View File

@@ -338,6 +338,9 @@ void CMakeToolManager::updateDocumentation()
QString CMakeToolManager::toolTipForRstHelpFile(const FilePath &helpFile)
{
static QHash<FilePath, QString> map;
static QMutex mutex;
QMutexLocker locker(&mutex);
if (map.contains(helpFile))
return map.value(helpFile);