From e48d365b199c6a6264c4ae28978d7798b6467ca5 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 7 Nov 2023 15:47:03 +0100 Subject: [PATCH] ProjectExplorer: Normalize separators on HeaderPath construction Fixes a Windows test failure in CompilationDatabaseProjectManager. Change-Id: Ic373b7a50b1374be4cf028fc304442c3cf077735 Reviewed-by: Christian Stenger --- src/plugins/projectexplorer/headerpath.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/headerpath.h b/src/plugins/projectexplorer/headerpath.h index f46d1ad401e..6df25245424 100644 --- a/src/plugins/projectexplorer/headerpath.h +++ b/src/plugins/projectexplorer/headerpath.h @@ -6,6 +6,7 @@ #include #include +#include #include #include @@ -22,7 +23,8 @@ class HeaderPath { public: HeaderPath() = default; - HeaderPath(const QString &path, HeaderPathType type) : path(path), type(type) { } + HeaderPath(const QString &path, HeaderPathType type) + : path(QDir::fromNativeSeparators(path)), type(type) { } HeaderPath(const char *path, HeaderPathType type) : HeaderPath(QLatin1String(path), type) {} HeaderPath(const Utils::FilePath &path, HeaderPathType type) : HeaderPath(path.path(), type)