forked from qt-creator/qt-creator
FilePath: Return optional bytearray for file contents
For differentiating between "error" and "empty file". Change-Id: I2c019ceac625e7be3180afa4d47ae3a24df91c1d Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -751,7 +751,8 @@ McuSdkRepository targetsAndPackages(const FilePath &qtForMCUSdkPath,
|
||||
for (const FilePath &filePath : descriptionFiles) {
|
||||
if (!filePath.isReadableFile())
|
||||
continue;
|
||||
const McuTargetDescription desc = parseDescriptionJson(filePath.fileContents());
|
||||
const McuTargetDescription desc = parseDescriptionJson(
|
||||
filePath.fileContents().value_or(QByteArray()));
|
||||
bool ok = false;
|
||||
const int compatVersion = desc.compatVersion.toInt(&ok);
|
||||
if (!desc.compatVersion.isEmpty() && ok && compatVersion > MAX_COMPATIBILITY_VERSION) {
|
||||
|
||||
Reference in New Issue
Block a user