summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorPeter Hartmann <peter.hartmann@nokia.com>2010-03-29 11:34:36 (GMT)
committerPeter Hartmann <peter.hartmann@nokia.com>2010-03-29 12:08:17 (GMT)
commit1eb54209adca3ed93426598c1dcf51ca4ba675be (patch)
treed3241e5052a7cc171964fde438a248385241a525 /src/network
parenta078587d6a0a3fc514d5395984b0c6e2efa76e9d (diff)
downloadQt-1eb54209adca3ed93426598c1dcf51ca4ba675be.zip
Qt-1eb54209adca3ed93426598c1dcf51ca4ba675be.tar.gz
Qt-1eb54209adca3ed93426598c1dcf51ca4ba675be.tar.bz2
QNAM HTTP: Fix invoking a method when being destructed right now
Reviewed-by: Thiago Macieira
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index 1d8224c..0b97cbe 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -648,7 +648,8 @@ void QHttpNetworkConnectionChannel::allDone()
close();
QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
} else if (alreadyPipelinedRequests.isEmpty()) {
- QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
+ if (qobject_cast<QHttpNetworkConnection*>(connection))
+ QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
}
}
@@ -753,7 +754,8 @@ void QHttpNetworkConnectionChannel::handleStatus()
}
break;
default:
- QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
+ if (qobject_cast<QHttpNetworkConnection*>(connection))
+ QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
}
}
@@ -801,7 +803,8 @@ void QHttpNetworkConnectionChannel::closeAndResendCurrentRequest()
requeueCurrentlyPipelinedRequests();
close();
resendCurrent = true;
- QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
+ if (qobject_cast<QHttpNetworkConnection*>(connection))
+ QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
}
bool QHttpNetworkConnectionChannel::isSocketBusy() const