diff options
author | David Schulz <david.schulz@qt.io> | 2023-06-02 09:59:27 +0200 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2023-06-05 05:44:43 +0000 |
commit | c2d008a3228d2862de692a16a5274b0472b60451 (patch) | |
tree | 72f74b4c9f6cdf018a59ac07c89caec646a954f5 | |
parent | 65a7d3a200279518217bd61b723708f389bad3c0 (diff) |
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>
-rw-r--r-- | src/plugins/clangformat/llvmfilesystem.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/clangformat/llvmfilesystem.h b/src/plugins/clangformat/llvmfilesystem.h index 675791f349..fface01fc0 100644 --- a/src/plugins/clangformat/llvmfilesystem.h +++ b/src/plugins/clangformat/llvmfilesystem.h @@ -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()) |