Changeset 923
- Timestamp:
- Jul 31, 2011, 11:07:15 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/corelib/io/qfsfileengine.cpp
r846 r923 890 890 Q_D(QFSFileEngine); 891 891 if (extension == AtEndExtension && d->fh && isSequential()) 892 #ifdef Q_OS_OS2 893 // On OS/2 feof() doesn't return 1 when the stream is a pipe and the 894 // other end of the pipe gets closed. This makes programs using the 895 // somewhat incorrect "while (qfile.atEnd())..." loop spin forever (UIC 896 // is one of such programs). In order to fix it, we use ferror() which 897 // does return 1 in cases like that. 898 return feof(d->fh) || ferror(d->fh); 899 #else 892 900 return feof(d->fh); 901 #endif 893 902 894 903 if (extension == MapExtension) {
Note:
See TracChangeset
for help on using the changeset viewer.