Designer: Simplify read error handling

The special encoding error handling is covered by the general
non-success handling.

Change-Id: Iee7186a54d80108ecbf5fb327a15a03d7a360b9f
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2025-04-17 08:49:55 +02:00
parent 8514d62721
commit 991cc47d29

View File

@@ -56,8 +56,6 @@ Result<> FormWindowFile::open(const FilePath &filePath, const FilePath &realFile
QString contents; QString contents;
TextFileFormat::ReadResult readResult = read(filePath.absoluteFilePath(), &contents); TextFileFormat::ReadResult readResult = read(filePath.absoluteFilePath(), &contents);
if (readResult.code == TextFileFormat::ReadEncodingError)
return ResultError(readResult.error);
if (readResult.code != TextFileFormat::ReadSuccess) if (readResult.code != TextFileFormat::ReadSuccess)
return ResultError(readResult.error); return ResultError(readResult.error);