[Qt-interest] qNetworkReply waitForReadyRead()

Srikanth Kavoori srikanth.kavoori at gmail.com
Mon Feb 16 18:39:45 CET 2009


hi  ,

thanks for your quick response.

>>No, it doesn't. It will always return false.
>>This is intentional and will never work.

. now how do i stop my reader from reading the data from device when there
is no data available and restart reading when the data is available. is
there an alternative. right now i am able to start reading the complete data
in the signal finished() , but would like to start reading in readyRead() as
soon as the data has arrived.


thanks for your help.

Best Regards,
Srikanth Kavoori



>
> ---------- Forwarded message ----------
> From: Srikanth Kavoori <srikanth.kavoori at gmail.com>
> To: qt-interest at trolltech.com
> Date: Mon, 16 Feb 2009 13:58:52 +0200
> Subject: [Qt-interest] qNetworkReply waitForReadyRead()
> Hi all ,
>
> Does anyone has any idea if waitForReadyRead works with QNetworkReply as a
> device.
>
> i connected my function to QNetworkReply's readyRead to get trigger to
> start reading my data.
> If i get all data in one readyRead everything works fine.
>
> but if readyRead gets connected only after a chunk of data even though i
> wait using waitForReadyRead , it never works.  waitForReadyRead always
> returns False even though bytesAvailable() is less than contentLength from
> the reply's headers.
>
> When i debugged the code , it always refers the base class
> waitForReadyRead() ( in this case QIODevice's function ) which has a default
> implementation to return FALSE.
>
> has anyone able QNetworkReply's readyRead function with multiple chunks of
> data without using waitForReadyRead ?
>
> Thanks in advance for your help.
>
> Best Regards,
> Srikanth Kavoori
> Sent from: Tampere Ls Finland.
>
>
> ---------- Forwarded message ----------
> From: Thiago Macieira <thiago.macieira at trolltech.com>
> To: qt-interest at trolltech.com
> Date: Mon, 16 Feb 2009 14:33:56 +0100
> Subject: Re: [Qt-interest] qNetworkReply waitForReadyRead()
> Em Segunda-feira 16 Fevereiro 2009, às 12:58:52, Srikanth Kavoori escreveu:
> > Does anyone has any idea if waitForReadyRead works with QNetworkReply as
> a
> > device.
>
> No, it doesn't. It will always return false.
>
> This is intentional and will never work.
>
> --
> Thiago Macieira - thiago.macieira (AT) nokia.com
>  Senior Product Manager - Nokia, Qt Software
>     Sandakerveien 116, NO-0402 Oslo, Norway
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090216/5d4dbdaa/attachment.html 


More information about the Qt-interest-old mailing list