forked from qt-creator/qt-creator
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:
@@ -2477,7 +2477,8 @@ void WatchModel::showEditValue(const WatchItem *item)
|
|||||||
QString fileName;
|
QString fileName;
|
||||||
ts >> width >> height >> nbytes >> imformat >> fileName;
|
ts >> width >> height >> nbytes >> imformat >> fileName;
|
||||||
QFile f(fileName);
|
QFile f(fileName);
|
||||||
f.open(QIODevice::ReadOnly);
|
const bool didFileOpen = f.open(QIODevice::ReadOnly);
|
||||||
|
QTC_ASSERT(didFileOpen, return);
|
||||||
ba = f.readAll();
|
ba = f.readAll();
|
||||||
bits = (uchar*)ba.data();
|
bits = (uchar*)ba.data();
|
||||||
nbytes = width * height;
|
nbytes = width * height;
|
||||||
|
Reference in New Issue
Block a user