--- a/src/network/access/qnetworkreplyimpl.cpp Wed Apr 21 12:15:23 2010 +0300
+++ b/src/network/access/qnetworkreplyimpl.cpp Wed Apr 21 20:15:53 2010 +0300
@@ -580,8 +580,13 @@
QNetworkReplyImpl::~QNetworkReplyImpl()
{
Q_D(QNetworkReplyImpl);
+
+ // This code removes the data from the cache if it was prematurely aborted.
+ // See QNetworkReplyImplPrivate::completeCacheSave(), we disable caching there after the cache
+ // save had been properly finished. So if it is still enabled it means we got deleted/aborted.
if (d->isCachingEnabled())
d->networkCache()->remove(url());
+
if (d->outgoingDataBuffer)
delete d->outgoingDataBuffer;
}