forked from qt-creator/qt-creator
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:
@@ -6,6 +6,7 @@
|
|||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
#include <utils/fileutils.h>
|
#include <utils/fileutils.h>
|
||||||
|
|
||||||
|
#include <QDir>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
|
|
||||||
@@ -22,7 +23,8 @@ class HeaderPath
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HeaderPath() = default;
|
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 char *path, HeaderPathType type) : HeaderPath(QLatin1String(path), type) {}
|
||||||
HeaderPath(const Utils::FilePath &path, HeaderPathType type)
|
HeaderPath(const Utils::FilePath &path, HeaderPathType type)
|
||||||
: HeaderPath(path.path(), type)
|
: HeaderPath(path.path(), type)
|
||||||
|
Reference in New Issue
Block a user