QNetworkReply has a method abort(). However, at least with Qt 4.6 there is a bug, which make this unusable. I don't remember what exactly the problem was, but there was already a bug report. This is what I noted in my source code:
// TODO/FIXME: This is a memory leak since the QNetworkReply might not be deleted.
// However, there is a bug in Qt 4.6.3 and 4.7.0 which results frequently in a segfault
// when calling abort or trying to delete the reply before it signals finished on its own.
m_queryReply = NULL;
// TODO/FIXME: This is a memory leak since the QNetworkReply might not be deleted.
// However, there is a bug in Qt 4.6.3 and 4.7.0 which results frequently in a segfault
// when calling abort or trying to delete the reply before it signals finished on its own.
m_queryReply = NULL;
To copy to clipboard, switch view to plain text mode
So my "solution" for this is just to ignore the reply result if it should arrive later.
The bug report said the problem would be fixed in 4.7.x However, I did not tried yet with 4.7.1.
Bookmarks