A quick and dirty fix is to make installFile() a slot and in httpRequestFinished() invoke the slot with help of timer (to allow control to return to QHttp, where the signal was emitted from):
Qt Code:
  1. if (error) {
  2. ...
  3. } else {
  4. //installFile();
  5. QTimer::singleShot(0, this, SLOT(installFile()));
  6. }
  7.  
  8. //delete file;
  9. //file = 0;
To copy to clipboard, switch view to plain text mode 
Notice also that you can't either delete the file here because you will later use it in installFile().