Commit b335b2a0 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

QmakeParser: Fix tests compilation

locker only exists with PROPARSER_THREAD_SAFE defined.

Broken by dedcd259



Change-Id: Ieee60dc6f567ab1c3a59697a1760afb2990496f6
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
parent b3113bbb
......@@ -61,6 +61,7 @@ void ProFileCache::discardFile(const QString &fileName)
#endif
QHash<QString, Entry>::Iterator it = parsed_files.find(fileName);
if (it != parsed_files.end()) {
#ifdef PROPARSER_THREAD_SAFE
if (it->locker) {
if (!it->locker->done)
it->locker->cond.wait(&mutex);
......@@ -70,6 +71,7 @@ void ProFileCache::discardFile(const QString &fileName)
lck.relock();
} while (it->locker);
}
#endif
if (it->pro)
it->pro->deref();
parsed_files.erase(it);
......@@ -86,6 +88,7 @@ void ProFileCache::discardFiles(const QString &prefix)
end = parsed_files.end();
while (it != end)
if (it.key().startsWith(prefix)) {
#ifdef PROPARSER_THREAD_SAFE
if (it->locker) {
if (!it->locker->done)
it->locker->cond.wait(&mutex);
......@@ -95,6 +98,7 @@ void ProFileCache::discardFiles(const QString &prefix)
lck.relock();
} while (it->locker);
}
#endif
if (it->pro)
it->pro->deref();
it = parsed_files.erase(it);
......
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