Unsolved Warning when cancel download file?
-
[CODE]QCoreApplication::postEvent: Unexpected null receiver
[/CODE]I don't know call what.
I make a downloader into a app, when I cancel download, I waning on console.
I don't know how to debug with problem. -
Hi,
Are you doing any
delete
call in your code ?By the way, which version of Qt are you using ?
On what platform ? -
Sure. I used delete
I code and run at Linux (ubuntu14.04)
Qt5.2.
Addition, Am I wrong?QNetworkReply *reply; ... if (reply != nullptr) { reply->disconnect(); reply->abort(); reply->deleteLater(); reply = nullptr; }
-
From the snippet you posted, you don't use
delete
butdeleteLater
. Why are you calling disconnect ? It will kill all connections done to the object. -
@SGaist but when I use deleteLater() download progress still is working, I need stop download file immedicately
-
Because the event loop has not yet processed every event thus the download might go some bytes further defore everything is processed.