Stop download with QNetworkReply
-
wrote on 9 May 2016, 16:07 last edited by
i can't stop download with this code
reply->abort();
Download is stopped but still using network for download file!
-
Hi
What you mean " still using network for download file"
What if u completely close program. Is this usage then stopped? -
Hi
What you mean " still using network for download file"
What if u completely close program. Is this usage then stopped? -
@ARASHz4 said:
ok. maybe silly questions but the QNetworkReply you abort() is
the only active one? -
@ARASHz4 said:
ok. maybe silly questions but the QNetworkReply you abort() is
the only active one? -
@ARASHz4
Im just fishing.
Is there any chance u abort other one
than the actual download one? -
@ARASHz4
Im just fishing.
Is there any chance u abort other one
than the actual download one? -
@ARASHz4
Ok. abort should do it as far as I know.
Sorry. lets wait and see if someone has better ideas. -
@ARASHz4
Ok. abort should do it as far as I know.
Sorry. lets wait and see if someone has better ideas. -
@ARASHz4
Thx. its cute :)
I can use any file for test? -
wrote on 9 May 2016, 18:12 last edited by
Hi! Does this also happen when you replace
abort()
withclose()
? Another thing: After callingabort()
, is thefinished()
signal emitted? -
Hi! Does this also happen when you replace
abort()
withclose()
? Another thing: After callingabort()
, is thefinished()
signal emitted?wrote on 9 May 2016, 18:13 last edited byAnd: On what platform do you observe this behaviour? Windows? Linux?
-
wrote on 9 May 2016, 18:17 last edited by
BTW: In your
cancelDownload()
function, it says:reply->abort(); reply = 0;
Looks like a memory leak to me.
-
And: On what platform do you observe this behaviour? Windows? Linux?
wrote on 9 May 2016, 18:29 last edited by@Wieland
i test before close()
i use Windows now -
hi
inDownloader::Downloader(QUrl Url, QObject *parent) : QObject(parent) { QNetworkRequest request(Url); DownloadManager.get(request);<<<<< THIS ? reply = DownloadManager.get(request);
you have extra DownloadManager.get(request);
if I // it, it now drops to 0 when I abort.
Before it did not. -
hi
inDownloader::Downloader(QUrl Url, QObject *parent) : QObject(parent) { QNetworkRequest request(Url); DownloadManager.get(request);<<<<< THIS ? reply = DownloadManager.get(request);
you have extra DownloadManager.get(request);
if I // it, it now drops to 0 when I abort.
Before it did not.wrote on 9 May 2016, 18:31 last edited by@mrjj Guter Mann. ;-)
-
hi
inDownloader::Downloader(QUrl Url, QObject *parent) : QObject(parent) { QNetworkRequest request(Url); DownloadManager.get(request);<<<<< THIS ? reply = DownloadManager.get(request);
you have extra DownloadManager.get(request);
if I // it, it now drops to 0 when I abort.
Before it did not. -
hi
inDownloader::Downloader(QUrl Url, QObject *parent) : QObject(parent) { QNetworkRequest request(Url); DownloadManager.get(request);<<<<< THIS ? reply = DownloadManager.get(request);
you have extra DownloadManager.get(request);
if I // it, it now drops to 0 when I abort.
Before it did not. -
wrote on 8 Sept 2019, 08:42 last edited by
In my case, disconnecting all signals relating to QNetworkReply from all slots causes to abort() not works.
disconnect(m_reply, nullptr, nullptr, nullptr);
abort function works normal after commenting this line.