summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpthreaddelegate.cpp
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2011-03-09 17:41:38 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2011-03-10 12:54:59 (GMT)
commitef53143777ccbd73799e597792a46b2676932cc2 (patch)
tree77325653f3655b52503b805b1af42f22f6d3a3ef /src/network/access/qhttpthreaddelegate.cpp
parent7b34e64198cbcdb8d738c9da11abe08c0ac880ac (diff)
downloadQt-ef53143777ccbd73799e597792a46b2676932cc2.zip
Qt-ef53143777ccbd73799e597792a46b2676932cc2.tar.gz
Qt-ef53143777ccbd73799e597792a46b2676932cc2.tar.bz2
Bearer support for threaded http backend
Reviewed-by: Markus Goetz
Diffstat (limited to 'src/network/access/qhttpthreaddelegate.cpp')
-rw-r--r--src/network/access/qhttpthreaddelegate.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/network/access/qhttpthreaddelegate.cpp b/src/network/access/qhttpthreaddelegate.cpp
index d75f12c..6d6fadd 100644
--- a/src/network/access/qhttpthreaddelegate.cpp
+++ b/src/network/access/qhttpthreaddelegate.cpp
@@ -142,8 +142,13 @@ class QNetworkAccessCachedHttpConnection: public QHttpNetworkConnection,
{
// Q_OBJECT
public:
+#ifdef QT_NO_BEARERMANAGEMENT
QNetworkAccessCachedHttpConnection(const QString &hostName, quint16 port, bool encrypt)
: QHttpNetworkConnection(hostName, port, encrypt)
+#else
+ QNetworkAccessCachedHttpConnection(const QString &hostName, quint16 port, bool encrypt, QSharedPointer<QNetworkSession> networkSession)
+ : QHttpNetworkConnection(hostName, port, encrypt, /*parent=*/0, networkSession)
+#endif
{
setExpires(true);
setShareable(true);
@@ -250,7 +255,11 @@ void QHttpThreadDelegate::startRequest()
if (httpConnection == 0) {
// no entry in cache; create an object
// the http object is actually a QHttpNetworkConnection
+#ifdef QT_NO_BEARERMANAGEMENT
httpConnection = new QNetworkAccessCachedHttpConnection(urlCopy.host(), urlCopy.port(), ssl);
+#else
+ httpConnection = new QNetworkAccessCachedHttpConnection(urlCopy.host(), urlCopy.port(), ssl, networkSession);
+#endif
#ifndef QT_NO_OPENSSL
// Set the QSslConfiguration from this QNetworkRequest.
if (ssl) {