Unfortunately, this is a known bug. But the Trolls do not seem to care that
the Mac folk have lots of old text files to read. (The line ending on Mac OS
X is now LF, not CR.)
You will have to implement your own readLine, or fix Qt's.
Of course, the _right_ way is to check for LF, CR, or LF/CR for every line.
Making any assumptions based on the platform or first line is dangerous.
(For instance, Visual Studio will create mixed line ending files when you
edit a different line ending type than the default. Edited lines will have
the default, but other lines retain the original.)
This has been a problem for years that is so easily solved. I fail to
understand why some developers still try to force everyone else to use their
line ending choice. It is such a Microsoft attitude.
Keith
Bookmarks