summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkreplyimpl.cpp
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-10 23:23:55 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-10 23:23:55 (GMT)
commitd7cf6d018f39607ff7315b7851665e72fc488e62 (patch)
treeb10cc34519de289514e8503850b5575a9854027d /src/network/access/qnetworkreplyimpl.cpp
parent5f885bc5a294cd831f79b5570cb41f3cae2b8b19 (diff)
downloadQt-d7cf6d018f39607ff7315b7851665e72fc488e62.zip
Qt-d7cf6d018f39607ff7315b7851665e72fc488e62.tar.gz
Qt-d7cf6d018f39607ff7315b7851665e72fc488e62.tar.bz2
Connect signals between QNAM and QNetworkReplyImpl.
Instead of iterating over children, when network session state changes.
Diffstat (limited to 'src/network/access/qnetworkreplyimpl.cpp')
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index 3cf21f0..a7948c2 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -226,6 +226,26 @@ void QNetworkReplyImplPrivate::_q_bufferOutgoingData()
}
}
+void QNetworkReplyImplPrivate::_q_networkSessionOnline()
+{
+ Q_Q(QNetworkReplyImpl);
+
+ switch (state) {
+ case QNetworkReplyImplPrivate::Buffering:
+ case QNetworkReplyImplPrivate::Working:
+ case QNetworkReplyImplPrivate::Reconnecting:
+ // Migrate existing downloads to new network connection.
+ migrateBackend();
+ break;
+ case QNetworkReplyImplPrivate::WaitingForSession:
+ // Start waiting requests.
+ QMetaObject::invokeMethod(q, "_q_startOperation", Qt::QueuedConnection);
+ break;
+ default:
+ qDebug() << "How do we handle replies in state" << state;
+ }
+}
+
void QNetworkReplyImplPrivate::setup(QNetworkAccessManager::Operation op, const QNetworkRequest &req,
QIODevice *data)
{