I have a problem with QFile::atEnd(). I have the following code (simplified):
This works fine on Linux and on MacOS X. But on Windows, this results in an infinite loop, i.e. atEnd() never returns true. Of course, the file exists and I can read from it.Qt Code:
while (!partFile->atEnd()) { line = partFile->readLine(); /* Do stuff with "line" */ }To copy to clipboard, switch view to plain text mode
I have noticed more oddities in QFile across platforms ("\" vs. "/" inconsistincies), but this one is kind of hard to work around...
Any ideas on what causes this and/or how to fix it?
Bookmarks