[Qt-interest] Why Bus error clientSocket->waitForConnected()?
Kustaa Nyholm
Kustaa.Nyholm at planmeca.com
Sun May 2 13:56:44 CEST 2010
>> But a readLine that terminates early just because not enough
>> data has arrived in time seems pretty useless to me, I would
>> *always* have to wrap this in a loop that checks for a complete
>> line having being received. Does not make sense to me.
>
>You can also work with bytesAvailable() and peek() to see whether the data you
>want is in the buffer already.
I guess I did not make myself clear.
My point was that a readLine that does not read a line is pretty much
useless as such. If I want to read a line I want to read a line and I
only want it to return in case there is no hope of ever reading a line,
ie there is an underlaying IO error or end of stream/file.
Strange API design in my view.
Sure I can work around that and write my own readLine or what ever
I need but what is the point of providing a readLine that does not
read a line....
br Kusti
More information about the Qt-interest-old
mailing list