PDA

View Full Version : suddenly datareadProgress total = 0



SpeedxDevil
11th July 2012, 18:13
I've been using datareadProgress(int done, int total) for quite some time without problems on the same server.
The last few days I've been making some changes and everything works perfectly but my total keeps ending up as 0
When I read the documentation this happens if the total file size cannot be obtained but nothing changed on our server and if I download with my browser I see the total file size.
Am I doing something wrong?

I'm using a private slot downloadProgress(int done, int total) which only has 4 lines to animate a progressBar with some text.
Using: connect(updateDownloader, SIGNAL(datareadProgress(int,int)), this, SLOT(downloadProgress(int,int)));

The slot works as I can see the downloaded size increase, It just won't set that total.

wysota
12th July 2012, 09:21
The server probably doesn't report content-length correctly. Sniff the headers and see for yourself.