ProjectExplorer: Normalize separators on HeaderPath construction

Fixes a Windows test failure in CompilationDatabaseProjectManager.

Change-Id: Ic373b7a50b1374be4cf028fc304442c3cf077735
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2023-11-07 15:47:03 +01:00
parent ffcbbecf27
commit e48d365b19

View File

@@ -6,6 +6,7 @@
#include <utils/algorithm.h>
#include <utils/fileutils.h>
#include <QDir>
#include <QString>
#include <QVector>
@@ -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)