Description
The usage of atEnd() might be costly because e.g. for a QFile it might make a stat() sys call.
Look where we are using atEnd() together with read(char*,int) in a loop. We can avoid the atEnd() call and check for a 0 or -1 return of read and only then call atEnd().