ProjectExplorer: Use FilePath for sysroots

... and reduce to the relevant part when passing to cmake.

Task-number: QTCREATORBUG-27229
Change-Id: I7cde2ff04530caf439d6707c2c6d15a8e734ae0b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2022-06-30 09:08:47 +02:00
parent c294df1d3a
commit 3be472c8d2
15 changed files with 34 additions and 32 deletions

View File

@@ -38,6 +38,7 @@
#include <QSet>
using namespace ProjectExplorer;
using namespace Utils;
namespace CompilationDatabaseProjectManager {
namespace Internal {
@@ -102,7 +103,7 @@ void filteredFlags(const QString &fileName,
HeaderPaths &headerPaths,
Macros &macros,
CppEditor::ProjectFile::Kind &fileKind,
QString &sysRoot)
Utils::FilePath &sysRoot)
{
if (flags.empty())
return;
@@ -192,7 +193,7 @@ void filteredFlags(const QString &fileName,
if (flag.startsWith("--sysroot=")) {
if (sysRoot.isEmpty())
sysRoot = updatedPathFlag(flag.mid(10), workingDir);
sysRoot = FilePath::fromString(updatedPathFlag(flag.mid(10), workingDir));
continue;
}