summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-08-12 21:12:36 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-26 23:56:47 +0200
commit87fcdcba087f37171511fa58451cbe1ee5673169 (patch)
treec1734699a94ea6bb0e1591be6d44de4f1592d486
parent4da64094c8dac54fc806f98fa60fcd91cf4d3df9 (diff)
downloadqttools-87fcdcba087f37171511fa58451cbe1ee5673169.tar.gz
avoid deadlock in cache() during spec/cache loading
sync up; doesn't do anything in lupdate. if we end up calling cache() from within the initialization of the base context, we cannot wait for for the completion of that initialization before we proceed, obviously. Change-Id: If30c6f3665fe423e767373a8821c406b2f5e0eca Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com> (cherry picked from qtcreator/b64b4431c20afd9e39c1463e736f998ef450688f)
-rw-r--r--src/linguist/shared/qmakebuiltins.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/linguist/shared/qmakebuiltins.cpp b/src/linguist/shared/qmakebuiltins.cpp
index 37654a2d7..4712df52d 100644
--- a/src/linguist/shared/qmakebuiltins.cpp
+++ b/src/linguist/shared/qmakebuiltins.cpp
@@ -1558,7 +1558,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional(
break;
#ifdef PROEVALUATOR_THREAD_SAFE
QMutexLocker locker(&baseEnv->mutex);
- if (baseEnv->inProgress) {
+ if (baseEnv->inProgress && baseEnv->evaluator != this) {
// The env is still in the works, but it may be already past the cache
// loading. So we need to wait for completion and amend it as usual.
QThreadPool::globalInstance()->releaseThread();