summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorSinan Tanilkan <sinan.tanilkan@nokia.com>2011-09-21 11:45:02 (GMT)
committerSinan Tanilkan <sinan.tanilkan@nokia.com>2011-09-21 11:45:02 (GMT)
commit160b82950ec53d3a0392df0fd18ac6856bfecbcf (patch)
tree1bdae6efe3fbcb7f25e0ce91884f83e1cdf68189 /src/network
parent8ba781b01e900148fec2e9d26485369b3295487f (diff)
parent085bd7cf2d76f9acd548120f859201b014970a72 (diff)
downloadQt-160b82950ec53d3a0392df0fd18ac6856bfecbcf.zip
Qt-160b82950ec53d3a0392df0fd18ac6856bfecbcf.tar.gz
Qt-160b82950ec53d3a0392df0fd18ac6856bfecbcf.tar.bz2
Merge branch '4.8' into earth-staging-master
Conflicts: dist/changes-4.8.0
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp20
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp5
-rw-r--r--src/network/kernel/qnetworkproxy.cpp7
3 files changed, 21 insertions, 11 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index 6101eea..4f2145e 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -48,6 +48,7 @@
#include <private/qauthenticator_p.h>
#include <qnetworkproxy.h>
#include <qauthenticator.h>
+#include <qcoreapplication.h>
#include <qbuffer.h>
#include <qpair.h>
@@ -665,32 +666,31 @@ QString QHttpNetworkConnectionPrivate::errorDetail(QNetworkReply::NetworkError e
QString errorString;
switch (errorCode) {
case QNetworkReply::HostNotFoundError:
- errorString = QString::fromLatin1(QT_TRANSLATE_NOOP("QHttp", "Host %1 not found"))
- .arg(socket->peerName());
+ errorString = QCoreApplication::translate("QHttp", "Host %1 not found").arg(socket->peerName());
break;
case QNetworkReply::ConnectionRefusedError:
- errorString = QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Connection refused"));
+ errorString = QCoreApplication::translate("QHttp", "Connection refused");
break;
case QNetworkReply::RemoteHostClosedError:
- errorString = QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Connection closed"));
+ errorString = QCoreApplication::translate("QHttp", "Connection closed");
break;
case QNetworkReply::TimeoutError:
- errorString = QLatin1String(QT_TRANSLATE_NOOP("QAbstractSocket", "Socket operation timed out"));
+ errorString = QCoreApplication::translate("QAbstractSocket", "Socket operation timed out");
break;
case QNetworkReply::ProxyAuthenticationRequiredError:
- errorString = QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Proxy requires authentication"));
+ errorString = QCoreApplication::translate("QHttp", "Proxy requires authentication");
break;
case QNetworkReply::AuthenticationRequiredError:
- errorString = QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Host requires authentication"));
+ errorString = QCoreApplication::translate("QHttp", "Host requires authentication");
break;
case QNetworkReply::ProtocolFailure:
- errorString = QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Data corrupted"));
+ errorString = QCoreApplication::translate("QHttp", "Data corrupted");
break;
case QNetworkReply::ProtocolUnknownError:
- errorString = QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Unknown protocol specified"));
+ errorString = QCoreApplication::translate("QHttp", "Unknown protocol specified");
break;
case QNetworkReply::SslHandshakeFailedError:
- errorString = QLatin1String(QT_TRANSLATE_NOOP("QHttp", "SSL handshake failed"));
+ errorString = QCoreApplication::translate("QHttp", "SSL handshake failed");
break;
default:
// all other errors are treated as QNetworkReply::UnknownNetworkError
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index 58eb0d8..0b568d4 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -275,6 +275,11 @@ void QNetworkReplyImplPrivate::_q_networkSessionConnected()
if (session->state() != QNetworkSession::Connected)
return;
+ #ifndef QT_NO_NETWORKPROXY
+ // Re-set proxies here as new session might have changed them
+ proxyList = manager->d_func()->queryProxy(QNetworkProxyQuery(request.url()));
+ #endif
+
switch (state) {
case QNetworkReplyImplPrivate::Buffering:
case QNetworkReplyImplPrivate::Working:
diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp
index 6d4df44..71d61a4 100644
--- a/src/network/kernel/qnetworkproxy.cpp
+++ b/src/network/kernel/qnetworkproxy.cpp
@@ -1197,6 +1197,11 @@ void QNetworkProxyQuery::setUrl(const QUrl &url)
}
#ifndef QT_NO_BEARERMANAGEMENT
+/*!
+ Returns the network configuration of the proxy query.
+
+ \sa setNetworkConfiguration()
+*/
QNetworkConfiguration QNetworkProxyQuery::networkConfiguration() const
{
return d ? d->config : QNetworkConfiguration();
@@ -1214,7 +1219,7 @@ QNetworkConfiguration QNetworkProxyQuery::networkConfiguration() const
you should first start the QNetworkSession and obtain the active
configuration from its properties.
- \sa networkConfiguration
+ \sa networkConfiguration()
*/
void QNetworkProxyQuery::setNetworkConfiguration(const QNetworkConfiguration &networkConfiguration)
{