PDA

View Full Version : QHttp::dataSendProgress(int, int) signal giving the same value twice



olidem
4th March 2010, 16:40
Hi,
I have set up my http request fine, now I want to set up a progressbar giving info to the user.

I connected the QHttp::dataSendProgress(int,int) signal to my gui class.

But the two parameters always have the *same* value, eg.

If actual contentLength is 68888, QHttp emits

dataSendProgress( 69064 , 69064 )
dataSendProgress( 69115 , 69115 )

Further, I am not able to calcualte this somehow else, since the values being emitted always get slightly larger than requestHeader.contentLenght().

I am still running Qt 4.5.2 on Windows.

Thanks in advance,
Oliver

olidem
5th March 2010, 10:15
hmmm, no answer... maybe some admin could move this thread to the qt programming forum?
Thanks in advance,
Oliver

pitonyak
5th March 2010, 18:38
My understanding is that the amount of data is not always known. The content length is taken from the header. I believe that the header can report the file size, or force the user to download the entire message body to determine the size. See section 4.4 here (http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html ).

That said, I do not know if what you are seeing is a bug, or because of that.