diff data/fileio/RemoteFile.cpp @ 287:557e00480279

* Fix #1755108 end of file not clearly shown and #1754808 crash when trying to retrieve remote file from absent server
author Chris Cannam
date Mon, 13 Aug 2007 14:51:35 +0000
parents 7802b0e2b0ff
children 4fc6f49436b3
line wrap: on
line diff
--- a/data/fileio/RemoteFile.cpp	Fri Aug 10 16:36:50 2007 +0000
+++ b/data/fileio/RemoteFile.cpp	Mon Aug 13 14:51:35 2007 +0000
@@ -164,16 +164,18 @@
 void
 RemoteFile::cleanup()
 {
-//    std::cerr << "RemoteFile::cleanup" << std::endl;
     m_done = true;
     if (m_http) {
-        delete m_http;
+        QHttp *h = m_http;
         m_http = 0;
+        h->abort();
+        h->deleteLater();
     }
     if (m_ftp) {
-        m_ftp->abort();
-        m_ftp->deleteLater();
+        QFtp *f = m_ftp;
         m_ftp = 0;
+        f->abort();
+        f->deleteLater();
     }
     delete m_progressDialog;
     m_progressDialog = 0;