summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXizhi Zhu <xizhi.zhu@nokia.com>2012-03-15 10:26:39 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-15 11:40:50 +0100
commit92659bacda53da782c84dff44d3caa2590dbc7cc (patch)
tree7d12bbe5dc753b4b237961cc41bb8ee176c792e9
parente8a7e926cf99906d3157a031e1a56fb23fe3e42b (diff)
Make sure QGlobalNetworkProxy is created for QNetworkProxy.
Otherwise, you don't have any socket engine handler created when directly setting a proxy to a socket. Change-Id: I35cd7f52331672a6d3e7bcdf817c0fe1fd1e7de3 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
-rw-r--r--src/network/kernel/qnetworkproxy.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp
index feef74e737..8d30e81c3b 100644
--- a/src/network/kernel/qnetworkproxy.cpp
+++ b/src/network/kernel/qnetworkproxy.cpp
@@ -426,6 +426,10 @@ template<> void QSharedDataPointer<QNetworkProxyPrivate>::detach()
QNetworkProxy::QNetworkProxy()
: d(0)
{
+ // make sure we have QGlobalNetworkProxy singleton created, otherwise
+ // you don't have any socket engine handler created when directly setting
+ // a proxy to a socket
+ globalNetworkProxy();
}
/*!
@@ -440,6 +444,10 @@ QNetworkProxy::QNetworkProxy(ProxyType type, const QString &hostName, quint16 po
const QString &user, const QString &password)
: d(new QNetworkProxyPrivate(type, hostName, port, user, password))
{
+ // make sure we have QGlobalNetworkProxy singleton created, otherwise
+ // you don't have any socket engine handler created when directly setting
+ // a proxy to a socket
+ globalNetworkProxy();
}
/*!