summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkaccessmanager.cpp
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-08 07:37:48 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-08 07:50:14 (GMT)
commitc6157559204b61b11537ab0c0aba16eb182b09fe (patch)
treed4ac2c233c46a36f9e6e868ffcbb07374eb632bb /src/network/access/qnetworkaccessmanager.cpp
parent2963cb346814d47fd59e04bfd9bcd5fde88d5bd8 (diff)
downloadQt-c6157559204b61b11537ab0c0aba16eb182b09fe.zip
Qt-c6157559204b61b11537ab0c0aba16eb182b09fe.tar.gz
Qt-c6157559204b61b11537ab0c0aba16eb182b09fe.tar.bz2
Automatically migrate in-progress transfers after roaming.
Automatically migrate in-progress transfers after roaming to a new access point for backends that support it. Currently only works for http transfers that do not upload data (i.e. HTTP GET).
Diffstat (limited to 'src/network/access/qnetworkaccessmanager.cpp')
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp35
1 files changed, 4 insertions, 31 deletions
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 617e398..8df580d 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -802,27 +802,6 @@ void QNetworkAccessManagerPrivate::_q_replyFinished()
QNetworkReply *reply = qobject_cast<QNetworkReply *>(q->sender());
if (reply)
emit q->finished(reply);
-
- if (session && deferredMigration) {
- foreach (QObject *child, q->children()) {
- if (child == reply)
- continue;
-
- QNetworkReplyImpl *replyImpl = qobject_cast<QNetworkReplyImpl *>(child);
- if (!replyImpl)
- continue;
-
- QNetworkReplyImplPrivate::State state = replyImpl->d_func()->state;
- if (state == QNetworkReplyImplPrivate::Buffering ||
- state == QNetworkReplyImplPrivate::Working) {
- return;
- }
- }
-
- deferredMigration = false;
- qDebug() << "Migrating as there are no pending replies.";
- session->migrate();
- }
}
void QNetworkAccessManagerPrivate::_q_replySslErrors(const QList<QSslError> &errors)
@@ -1136,6 +1115,7 @@ void QNetworkAccessManagerPrivate::_q_sessionNewConfigurationActivated()
{
Q_Q(QNetworkAccessManager);
+#if 0
foreach (QObject *child, q->children()) {
QNetworkReplyImpl *reply = qobject_cast<QNetworkReplyImpl *>(child);
if (reply) {
@@ -1151,6 +1131,7 @@ void QNetworkAccessManagerPrivate::_q_sessionNewConfigurationActivated()
}
}
}
+#endif
qDebug() << "Accepting new configuration.";
session->accept();
@@ -1183,18 +1164,10 @@ void QNetworkAccessManagerPrivate::_q_sessionPreferredConfigurationChanged(const
foreach (QObject *child, q->children()) {
QNetworkReplyImpl *replyImpl = qobject_cast<QNetworkReplyImpl *>(child);
- if (replyImpl) {
- QNetworkReplyImplPrivate::State state = replyImpl->d_func()->state;
- if (state == QNetworkReplyImplPrivate::Buffering ||
- state == QNetworkReplyImplPrivate::Working) {
- deferredMigration = true;
- return;
- }
- }
+ if (replyImpl)
+ replyImpl->migrateBackend();
}
- deferredMigration = false;
- qDebug() << "Migrating as there are no pending replies.";
session->migrate();
}