QIODevice and the related classes use qint64 for positions and sizes which is a signed datatype. Is there a need to express negative values? Because otherwise the 8 bytes of such a type could be used to express greater sizes, couldn’t they?
QIODevice and the related classes use qint64 for positions and sizes which is a
Share
An error value of -1 is returned for several functions in
QIODevice. Qt often uses a C style of error handing using return values to avoid the need for a compiler or platform that supports the use of C++ exceptions. It is important to check for these error codes.From the manual:
QIODevice::writeandQIODevice::writeDataQIODevice::read(char*,qint64)QIODevice::readData(char*,qint64)QIODevice::peek(char*,qint64)