forked from qt-creator/qt-creator
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:
@@ -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);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user