summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2012-11-22 11:59:11 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-23 10:08:10 +0100
commit7ff393944e5d78d48f4b1f63592d7362ae06fd5d (patch)
tree7691c9fcf0272d64fd0fc0bdbbf6cd167a9031fb
parent31e801d64290e7901eb0164491edb8c288a72025 (diff)
qmake: do not exclusively lock files for reading on Windows/MSVC
When sifting through a file to find Q_OBJECT and friends, qmake was locking it for reading and writing (_SH_DENYRW). This breaks parallel builds where multiple qmake instances might want to scan the same file. Changed the sharing constant to _SH_DENYNO, which doesn't lock the file at all. This is consistent with the _sopen_s call in findDeps. Change-Id: I9c0a06db7f580f411e79d9d96dd36a6d705679aa Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
-rw-r--r--qmake/generators/makefiledeps.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qmake/generators/makefiledeps.cpp b/qmake/generators/makefiledeps.cpp
index d8c38cbb52..88c0f86d7d 100644
--- a/qmake/generators/makefiledeps.cpp
+++ b/qmake/generators/makefiledeps.cpp
@@ -697,7 +697,7 @@ bool QMakeSourceFileInfo::findMocs(SourceFile *file)
int fd;
#if defined(_MSC_VER) && _MSC_VER >= 1400
if (_sopen_s(&fd, fixPathForFile(file->file, true).local().toLocal8Bit().constData(),
- _O_RDONLY, _SH_DENYRW, _S_IREAD) != 0)
+ _O_RDONLY, _SH_DENYNO, _S_IREAD) != 0)
fd = -1;
#else
fd = open(fixPathForFile(file->file, true).local().toLocal8Bit().constData(), O_RDONLY);