ClangFormat: use fromUserInput to prevent asserts

Change-Id: I9f33c8e8ef276d771d727a6678cf72e80e7d46d9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
David Schulz
2023-06-02 09:59:27 +02:00
parent 65a7d3a200
commit c2d008a322

View File

@@ -50,7 +50,7 @@ public:
Q_UNUSED(RequiresNullTerminator);
Q_UNUSED(IsVolatile);
const FilePath path = FilePath::fromString(QString::fromStdString(Name.str()));
const FilePath path = FilePath::fromUserInput(QString::fromStdString(Name.str()));
const expected_str<QByteArray> contents = path.fileContents(FileSize, 0);
QTC_ASSERT_EXPECTED(contents, return std::error_code());
@@ -72,7 +72,7 @@ public:
ErrorOr<Status> status(const Twine &Path) override
{
const Utils::FilePath path = FilePath::fromString(QString::fromStdString(Path.str()));
const FilePath path = FilePath::fromUserInput(QString::fromStdString(Path.str()));
QFileInfo fInfo(QString::fromStdString(Path.str()));
if (!fInfo.exists())