CMakeProjectManager: Fix clang code model when CMake PCHs are used

CMake gives the path to the cmake_pch.h[xx] file as relative path
to build directory. Making it absolute fixes the code model.

Fixes: QTCREATORBUG-22888
Change-Id: I2fdc080be779f22b737788be2074254290994aaa
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Cristian Adam
2019-10-21 15:06:28 +02:00
parent 78e5a8a80a
commit 8ee22dd597
3 changed files with 26 additions and 8 deletions

View File

@@ -925,6 +925,12 @@ bool FilePath::isChildOf(const QDir &dir) const
return isChildOf(FilePath::fromString(dir.absolutePath()));
}
/// \returns whether FilePath startsWith \a s
bool FilePath::startsWith(const QString &s) const
{
return m_data.startsWith(s, HostOsInfo::fileNameCaseSensitivity());
}
/// \returns whether FilePath endsWith \a s
bool FilePath::endsWith(const QString &s) const
{