this is more like STL habit where this kind construction is obligatory since in STL istream::eof() returns true only when attempt of reading bound end of file happened.
In Qt you there is no EOF method, but method QTextStream::atEnd and this is why I confused things (sorry). This different names indicates that it works in different way.