Debugger: Check return value

Coverity complains about not checking the return value of f.open()

Coverity-Id: 1359453
Change-Id: I9e6b7f5d3ab6ec58e99131e8a0d84d8f17863fed
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Marcus Tillmanns
2023-11-02 14:42:28 +01:00
parent 5becefbe72
commit 4593089bdc

View File

@@ -2477,7 +2477,8 @@ void WatchModel::showEditValue(const WatchItem *item)
QString fileName;
ts >> width >> height >> nbytes >> imformat >> fileName;
QFile f(fileName);
f.open(QIODevice::ReadOnly);
const bool didFileOpen = f.open(QIODevice::ReadOnly);
QTC_ASSERT(didFileOpen, return);
ba = f.readAll();
bits = (uchar*)ba.data();
nbytes = width * height;