forked from qt-creator/qt-creator
ProjectExplorer: Fix builtin header path query
Change-Id: Iad8883cef88ac605f5ef3bc7e9922a02e4da5bd3 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -124,7 +124,7 @@ void HeaderPathFilter::tweakHeaderPaths()
|
|||||||
auto split = resourceIterator(builtInHeaderPaths);
|
auto split = resourceIterator(builtInHeaderPaths);
|
||||||
|
|
||||||
if (!clangIncludeDirectory.isEmpty())
|
if (!clangIncludeDirectory.isEmpty())
|
||||||
builtInHeaderPaths.insert(split, HeaderPath::makeBuiltIn(clangIncludeDirectory));
|
builtInHeaderPaths.insert(split, HeaderPath::makeBuiltIn(clangIncludeDirectory.path()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void HeaderPathFilter::addPreIncludesPath()
|
void HeaderPathFilter::addPreIncludesPath()
|
||||||
|
@@ -193,7 +193,10 @@ HeaderPaths GccToolChain::gccHeaderPaths(const FilePath &gcc,
|
|||||||
thisHeaderKind = HeaderPathType::Framework;
|
thisHeaderKind = HeaderPathType::Framework;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString headerPath = QFileInfo(QFile::decodeName(line)).canonicalFilePath();
|
const FilePath headerPath
|
||||||
|
= FilePath::fromString(QString::fromUtf8(line)).onDevice(gcc).canonicalPath();
|
||||||
|
|
||||||
|
if (!headerPath.isEmpty())
|
||||||
builtInHeaderPaths.append({headerPath, thisHeaderKind});
|
builtInHeaderPaths.append({headerPath, thisHeaderKind});
|
||||||
} else if (line.startsWith("End of search list.")) {
|
} else if (line.startsWith("End of search list.")) {
|
||||||
break;
|
break;
|
||||||
|
@@ -25,7 +25,8 @@ public:
|
|||||||
HeaderPath(const QString &path, HeaderPathType type) : path(path), type(type) { }
|
HeaderPath(const QString &path, HeaderPathType type) : path(path), type(type) { }
|
||||||
HeaderPath(const char *path, HeaderPathType type) : HeaderPath(QLatin1String(path), type) {}
|
HeaderPath(const char *path, HeaderPathType type) : HeaderPath(QLatin1String(path), type) {}
|
||||||
HeaderPath(const Utils::FilePath &path, HeaderPathType type)
|
HeaderPath(const Utils::FilePath &path, HeaderPathType type)
|
||||||
: HeaderPath(path.toString(), type) { }
|
: HeaderPath(path.path(), type)
|
||||||
|
{}
|
||||||
|
|
||||||
bool operator==(const HeaderPath &other) const
|
bool operator==(const HeaderPath &other) const
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user