summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkreplyimpl.cpp
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-07-26 11:05:15 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2010-07-27 11:00:22 (GMT)
commit83dbd809a0af50ac91d1e36a6b0437fc263958f3 (patch)
tree0930379267e2035a6659234c0ef7010d7e00767a /src/network/access/qnetworkreplyimpl.cpp
parent9b06a827cbb3967e7476ca0888f8bf3b171424f2 (diff)
downloadQt-83dbd809a0af50ac91d1e36a6b0437fc263958f3.zip
Qt-83dbd809a0af50ac91d1e36a6b0437fc263958f3.tar.gz
Qt-83dbd809a0af50ac91d1e36a6b0437fc263958f3.tar.bz2
QNAM: Stop half-supporting wrong way of deleting
We clearly state that deleteLater() should be used. Therefore stop the usage of QPointer to track deletion since it is bad for performance and only worked in some cases anyway. Reviewed-by: Peter Hartmann
Diffstat (limited to 'src/network/access/qnetworkreplyimpl.cpp')
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index 31ee2a4..3798ac2 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -543,8 +543,6 @@ void QNetworkReplyImplPrivate::appendDownstreamDataSignalEmissions()
{
Q_Q(QNetworkReplyImpl);
- QPointer<QNetworkReplyImpl> qq = q;
-
QVariant totalSize = cookedHeaders.value(QNetworkRequest::ContentLengthHeader);
if (preMigrationDownloaded != Q_INT64_C(-1))
totalSize = totalSize.toLongLong() + preMigrationDownloaded;
@@ -555,13 +553,10 @@ void QNetworkReplyImplPrivate::appendDownstreamDataSignalEmissions()
// else implicit sharing will trigger memcpy when the user is reading data!
emit q->readyRead();
- // hopefully we haven't been deleted here
- if (!qq.isNull()) {
- resumeNotificationHandling();
- // do we still have room in the buffer?
- if (nextDownstreamBlockSize() > 0)
- backendNotify(QNetworkReplyImplPrivate::NotifyDownstreamReadyWrite);
- }
+ resumeNotificationHandling();
+ // do we still have room in the buffer?
+ if (nextDownstreamBlockSize() > 0)
+ backendNotify(QNetworkReplyImplPrivate::NotifyDownstreamReadyWrite);
}
// this is used when it was fetched from the cache, right?