Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.15.0 RC2
-
None
Description
From https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/io/qiodevice.cpp:
/*! For open random-access devices, this function returns the size of the device. For open sequential devices, bytesAvailable() is returned. If the device is closed, the size returned will not reflect the actual size of the device. \sa isSequential(), pos() */ qint64 QIODevice::size() const { return d_func()->isSequential() ? bytesAvailable() : qint64(0); }
size() should return the size of the device for open random-access devicesĀ (NOT an open sequential device, i.e. the second part of the ternary expression). But, it returns 0.