forked from qt-creator/qt-creator
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:
@@ -50,7 +50,7 @@ public:
|
|||||||
Q_UNUSED(RequiresNullTerminator);
|
Q_UNUSED(RequiresNullTerminator);
|
||||||
Q_UNUSED(IsVolatile);
|
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);
|
const expected_str<QByteArray> contents = path.fileContents(FileSize, 0);
|
||||||
QTC_ASSERT_EXPECTED(contents, return std::error_code());
|
QTC_ASSERT_EXPECTED(contents, return std::error_code());
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ public:
|
|||||||
|
|
||||||
ErrorOr<Status> status(const Twine &Path) override
|
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()));
|
QFileInfo fInfo(QString::fromStdString(Path.str()));
|
||||||
if (!fInfo.exists())
|
if (!fInfo.exists())
|
||||||
|
Reference in New Issue
Block a user