PDA

View Full Version : Problem with QHttp requestFinished



jdd81
6th November 2008, 23:31
Hi,

I am writing a class to download and process user selected files from a specific source, and I'm experiencing some issues with QHttp and how the requestFinished signal is being fired. I am using QHttp::get to start the downloads, and the files are arriving with no difficulties for one or more files. The problem arises when the last file is finished when the program begins the processing phase (which starts with unzipping the downloaded files using QProcess). After a few seconds (about 10-12) the requestFinished signal is emitted again for the last file, out of nowhere with no requestStarted emission. Has anyone else run into this behavior? and if so, were you able to fix it?

The following is some debug output tracking http object states and request start/finish:



Current req id: 4
Starting request: 3
Request finished: 3
Starting request: 4
State change to: 3
State change to: 4
State change to: 5
Request finished: 4
unzip
[New Thread -1245271152 (LWP 23590)]
State change to: 6
State change to: 0
Request finished: 4


Any insight would be greatly appreciated!
Jd