aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/tools/buildgraphlocker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/corelib/tools/buildgraphlocker.cpp')
-rw-r--r--src/lib/corelib/tools/buildgraphlocker.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/corelib/tools/buildgraphlocker.cpp b/src/lib/corelib/tools/buildgraphlocker.cpp
index 8a7c0ec7c..da804e1a8 100644
--- a/src/lib/corelib/tools/buildgraphlocker.cpp
+++ b/src/lib/corelib/tools/buildgraphlocker.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing
**
-** This file is part of the Qt Build Suite.
+** This file is part of Qbs.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
@@ -31,6 +31,7 @@
#include "buildgraphlocker.h"
#include "error.h"
+#include "hostosinfo.h"
#include "processutils.h"
#include "version.h"
@@ -49,6 +50,12 @@ static bool hasQtBug45497()
return Version::fromString(QLatin1String(qVersion())) < Version(5, 5, 1);
}
+static bool hasQtBug53392()
+{
+ return HostOsInfo::isWindowsHost()
+ && Version::fromString(QLatin1String(qVersion())) < Version(5, 6, 2);
+}
+
BuildGraphLocker::BuildGraphLocker(const QString &buildGraphFilePath, const Logger &logger)
: m_lockFile(buildGraphFilePath + QLatin1String(".lock"))
, m_logger(logger)
@@ -70,7 +77,7 @@ BuildGraphLocker::BuildGraphLocker(const QString &buildGraphFilePath, const Logg
QString hostName;
QString appName;
if (m_lockFile.getLockInfo(&pid, &hostName, &appName)) {
- if (!hasQtBug45497() || appName == processNameByPid(pid)) {
+ if ((!hasQtBug45497() && !hasQtBug53392()) || appName == processNameByPid(pid)) {
throw ErrorInfo(Tr::tr("Cannot lock build graph file '%1': "
"Already locked by '%2' (PID %3).")
.arg(buildGraphFilePath, appName).arg(pid));