ProParser: Fix build

Amends 2f8b541fe5.

Change-Id: I596d846e2d143e71f217e01b5c820ceb7a3ccada
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Christian Stenger
2021-10-05 06:49:22 +02:00
parent 111ca0964e
commit 530a4cc17d

View File

@@ -72,8 +72,8 @@ void ProFileCache::discardFile(int id)
#endif #endif
auto it = parsed_files.find(id); auto it = parsed_files.find(id);
if (it != parsed_files.end()) { if (it != parsed_files.end()) {
#ifdef PROPARSER_THREAD_SAFE
Entry &entry = it->second; Entry &entry = it->second;
#ifdef PROPARSER_THREAD_SAFE
Entry::Locker *locker = entry.locker; Entry::Locker *locker = entry.locker;
if (locker) { // Either it's still being prepared or it's already done but someone if (locker) { // Either it's still being prepared or it's already done but someone
// else started waiting for it when it wasn't ready yet // else started waiting for it when it wasn't ready yet
@@ -118,9 +118,9 @@ void ProFileCache::discardFiles(const QString &prefix, QMakeVfs *vfs)
// Note: this is empty for virtual files from other VFSes. // Note: this is empty for virtual files from other VFSes.
const QString fn = vfs->fileNameForId(id); const QString fn = vfs->fileNameForId(id);
if (fn.startsWith(prefix)) { if (fn.startsWith(prefix)) {
#ifdef PROPARSER_THREAD_SAFE
bool continueFromScratch = false; bool continueFromScratch = false;
Entry &entry = it->second; Entry &entry = it->second;
#ifdef PROPARSER_THREAD_SAFE
Entry::Locker *locker = entry.locker; Entry::Locker *locker = entry.locker;
if (locker) { // Either it's still being prepared or it's already done but someone if (locker) { // Either it's still being prepared or it's already done but someone
// else started waiting for it when it wasn't ready yet // else started waiting for it when it wasn't ready yet