bool QIODevice::atEnd() const { if ( isSequentialAccess() || isTranslated() ) { QIODevice* that = (QIODevice*)this; int c = that->getch(); bool result = c < 0; that->ungetch(c); return result; } else { return at() == (int)size(); } }
bool QIODevice::atEnd() const { if ( isSequentialAccess() || isTranslated() ) { QIODevice* that = (QIODevice*)this; const int oldStatus = ioSt; int c = that->getch(); bool result = c < 0; that->ungetch(c); if (ioSt != oldStatus) that->ioSt = oldStatus; return result; } else { return at() == size(); } }