summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkaccessbackend.cpp
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-01-28 01:27:49 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-03 06:57:42 (GMT)
commitdf551752b7f430ab44bb1dd2ad0aa8c2a5187ef8 (patch)
treee314f8cad85765d52669a6778610c3377dd9ef9f /src/network/access/qnetworkaccessbackend.cpp
parent2149a313e671b22382828b58d2520807a5a061e1 (diff)
downloadQt-df551752b7f430ab44bb1dd2ad0aa8c2a5187ef8.zip
Qt-df551752b7f430ab44bb1dd2ad0aa8c2a5187ef8.tar.gz
Qt-df551752b7f430ab44bb1dd2ad0aa8c2a5187ef8.tar.bz2
Bearer Management Integration.
Perform application level roaming when all pending QNetworkReplys have completed. Emit temporary network failure error when connection to network is lost but is possibly recovering due to roaming. Don't save downloads in cache if they are not complete.
Diffstat (limited to 'src/network/access/qnetworkaccessbackend.cpp')
-rw-r--r--src/network/access/qnetworkaccessbackend.cpp24
1 files changed, 4 insertions, 20 deletions
diff --git a/src/network/access/qnetworkaccessbackend.cpp b/src/network/access/qnetworkaccessbackend.cpp
index c712fff..22df248 100644
--- a/src/network/access/qnetworkaccessbackend.cpp
+++ b/src/network/access/qnetworkaccessbackend.cpp
@@ -49,7 +49,6 @@
#include "qnetworkaccesscachebackend_p.h"
#include "qabstractnetworkcache.h"
-#include "qnetworksession.h"
#include "qhostinfo.h"
#include "private/qnoncontiguousbytedevice_p.h"
@@ -345,22 +344,20 @@ void QNetworkAccessBackend::sslErrors(const QList<QSslError> &errors)
void QNetworkAccessBackend::start()
{
- qDebug() << "Checking for localhost";
QHostInfo hostInfo = QHostInfo::fromName(reply->url.host());
foreach (const QHostAddress &address, hostInfo.addresses()) {
if (address == QHostAddress::LocalHost ||
address == QHostAddress::LocalHostIPv6) {
// Don't need session for local host access.
- qDebug() << "Access is to localhost";
open();
return;
}
}
- qDebug() << "Connecting session signals";
connect(manager->session, SIGNAL(opened()), this, SLOT(sessionOpened()));
+ connect(manager->session, SIGNAL(error(QNetworkSession::SessionError)),
+ this, SLOT(sessionError(QNetworkSession::SessionError)));
- qDebug() << "Open session if required";
if (!manager->session->isOpen())
manager->session->open();
else
@@ -369,25 +366,12 @@ void QNetworkAccessBackend::start()
void QNetworkAccessBackend::sessionOpened()
{
- manager->sendDebugMessage(QLatin1String("Session opened"));
- qDebug() << "Session opened, calling open()";
open();
}
-void QNetworkAccessBackend::preferredConfigurationChanged(const QNetworkConfiguration &config,
- bool isSeamless)
+void QNetworkAccessBackend::sessionError(QNetworkSession::SessionError error)
{
- QString message = QString::fromLatin1("preferredConfiguirationChanged %1 %2")
- .arg(config.name()) .arg(isSeamless);
-
- manager->sendDebugMessage(message);
- manager->session->ignore();
-}
-
-void QNetworkAccessBackend::newConfigurationActivated()
-{
- manager->sendDebugMessage(QLatin1String("newConfigurationActivated"));
- manager->session->reject();
+ manager->sendDebugMessage(QString::fromLatin1("Session error %1").arg(error));
}
QT_END_NAMESPACE