[Kst] QTextStream::readLine() vs QFile::ReadBlock() vs
Nicolas.Brisset at eurocopter.com
Fri Jan 14 19:32:03 CET 2005
I am trying to add configuration options to the ASCII datasource, which
leads to quite a lot of changes to account for all the new options. Some
of the changes regard how we read/parse the data file. As I'm not a
specialist I must confess I wonder what the differences are between the
3 methods QTextStream::readLine(), QFile::ReadBlock() and
QFile::ReadLine(). Of course, I understand the differences wrt to how to
use them, but it's not clear to me what their relative performance is.
Could someone help me understand why there are so many lines in
ascii.cpp (readField() method) to just detect where the new data lines
start when it would be much easier to e.g. just use a QTextStream to
read the file line by line and discard lines beginning with one of the
comment delimiters ?
Another question I have is whether there are other ways of reading
directly from a given point in the file other than QFile::at() (e.g.
with a QTextStream) ?
Thanks for your help :-)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Kst