diff options
author | Liang Qi <liang.qi@qt.io> | 2019-05-13 08:04:58 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-05-13 08:04:58 +0200 |
commit | 388fe97f2a54089544dff0ed3af6ca70bf604716 (patch) | |
tree | 163b47974c625849726804337bd667c942dfbc77 /qmake/generators | |
parent | a0c4b6f34546bdd22167a76a0540d37e9a37c0cf (diff) | |
parent | 591116490cf313808e8ba05ddd066656a1d1a566 (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
src/corelib/tools/qstring.cpp
Change-Id: I81dbf90fc936c9bf08197baefa071117bddb1c63
Diffstat (limited to 'qmake/generators')
-rw-r--r-- | qmake/generators/makefiledeps.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/qmake/generators/makefiledeps.cpp b/qmake/generators/makefiledeps.cpp index decc1d980c..1aab1987d2 100644 --- a/qmake/generators/makefiledeps.cpp +++ b/qmake/generators/makefiledeps.cpp @@ -837,7 +837,9 @@ bool QMakeSourceFileInfo::findDeps(SourceFile *file) if(inc) { if(!includes) includes = new SourceFiles; - SourceFile *dep = includes->lookupFile(inc); + /* QTBUG-72383: Local includes "foo.h" must first be resolved relative to the + * sourceDir, only global includes <bar.h> are unique. */ + SourceFile *dep = try_local ? nullptr : includes->lookupFile(inc); if(!dep) { bool exists = false; QMakeLocalFileName lfn(inc); @@ -876,7 +878,11 @@ bool QMakeSourceFileInfo::findDeps(SourceFile *file) dep->file = lfn; dep->type = QMakeSourceFileInfo::TYPE_C; files->addFile(dep); - includes->addFile(dep, inc, false); + /* QTBUG-72383: Local includes "foo.h" are keyed by the resolved + * path (stored in dep itself), only global includes <bar.h> are + * unique keys immediately. */ + const char *key = try_local ? nullptr : inc; + includes->addFile(dep, key, false); } dep->exists = exists; } |