summaryrefslogtreecommitdiffstats
path: root/src/network/access
diff options
context:
space:
mode:
authorXizhi Zhu <xizhi.zhu@gmail.com>2012-02-01 22:26:36 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-02 14:18:36 +0100
commit319ba95c763c5e323e338119750651ef7e0cd897 (patch)
treeb94ec9213d6b897af03d73b571749b4ba42a086d /src/network/access
parent3acbb12d2d177e6df86370374a728ec3ce082566 (diff)
Call start() even when bearer is not compiled.
Otherwise, the HTTP request won't be sent if bearer is not compiled. Change-Id: I9a8171fde6fe5b2db0405b4af6e1d52ac4528502 Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
Diffstat (limited to 'src/network/access')
-rw-r--r--src/network/access/qnetworkreplyhttpimpl.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp
index c7e2995456..71bc03e8d0 100644
--- a/src/network/access/qnetworkreplyhttpimpl.cpp
+++ b/src/network/access/qnetworkreplyhttpimpl.cpp
@@ -1499,10 +1499,11 @@ bool QNetworkReplyHttpImplPrivate::start()
{
#ifndef QT_NO_BEARERMANAGEMENT
if (!managerPrivate->networkSession) {
+#endif
postRequest();
return true;
+#ifndef QT_NO_BEARERMANAGEMENT
}
-#endif
// This is not ideal.
const QString host = url.host();
@@ -1513,15 +1514,14 @@ bool QNetworkReplyHttpImplPrivate::start()
return true;
}
-#ifndef QT_NO_BEARERMANAGEMENT
if (managerPrivate->networkSession->isOpen() &&
managerPrivate->networkSession->state() == QNetworkSession::Connected) {
postRequest();
return true;
}
-#endif
return false;
+#endif
}
void QNetworkReplyHttpImplPrivate::_q_startOperation()
@@ -1533,13 +1533,12 @@ void QNetworkReplyHttpImplPrivate::_q_startOperation()
}
state = Working;
+ if (!start()) {
#ifndef QT_NO_BEARERMANAGEMENT
- if (!start()) { // ### we should call that method even if bearer is not used
// backend failed to start because the session state is not Connected.
// QNetworkAccessManager will call reply->backend->start() again for us when the session
// state changes.
state = WaitingForSession;
-
QNetworkSession *session = managerPrivate->networkSession.data();
if (session) {
@@ -1553,10 +1552,9 @@ void QNetworkReplyHttpImplPrivate::_q_startOperation()
} else {
qWarning("Backend is waiting for QNetworkSession to connect, but there is none!");
}
-
+#endif
return;
}
-#endif
if (synchronous) {
state = Finished;