forked from qt-creator/qt-creator
CMakeProjectManager: Fix path construction of pch files
This triggered soft asserts in FileUtils::copyIfDifferent() when
opening top-level qt.
Amends 246f33c20d
which introduced a unwanted extra .parentDir() call
which removed part of the path.
Change-Id: Id0475a74a589372d37b7ec65d33d3faf6194013c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -497,10 +497,7 @@ static RawProjectParts generateRawProjectParts(const QFuture<void> &cancelFuture
|
|||||||
return si.path.endsWith(ending);
|
return si.path.endsWith(ending);
|
||||||
}).path);
|
}).path);
|
||||||
if (!precompiled_header.isEmpty()) {
|
if (!precompiled_header.isEmpty()) {
|
||||||
if (precompiled_header.toFileInfo().isRelative()) {
|
precompiled_header = sourceDirectory.resolvePath(precompiled_header);
|
||||||
const FilePath parentDir = sourceDirectory.parentDir();
|
|
||||||
precompiled_header = parentDir.pathAppended(precompiled_header.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove the CMake PCH usage command line options in order to avoid the case
|
// Remove the CMake PCH usage command line options in order to avoid the case
|
||||||
// when the build system would produce a .pch/.gch file that would be treated
|
// when the build system would produce a .pch/.gch file that would be treated
|
||||||
|
Reference in New Issue
Block a user